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

Percentage Accurate: 95.2% → 97.9%
Time: 5.3s
Alternatives: 17
Speedup: 0.5×

Specification

?
\[\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 \]
(FPCore (x y z t a b)
  :precision binary64
  (+ (- (- x (* (- y 1) z)) (* (- t 1) a)) (* (- (+ y t) 2) 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), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 95.2% accurate, 1.0× speedup?

\[\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 \]
(FPCore (x y z t a b)
  :precision binary64
  (+ (- (- x (* (- y 1) z)) (* (- t 1) a)) (* (- (+ y t) 2) 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), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\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

Alternative 1: 97.9% accurate, 0.5× speedup?

\[\begin{array}{l} \mathbf{if}\;\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 \leq \infty:\\ \;\;\;\;\left(\left(\left(1 - t\right) \cdot a + x\right) - z \cdot \left(y - 1\right)\right) - \left(2 - \left(t + y\right)\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
(FPCore (x y z t a b)
  :precision binary64
  (if (<=
     (+ (- (- x (* (- y 1) z)) (* (- t 1) a)) (* (- (+ y t) 2) b))
     INFINITY)
  (- (- (+ (* (- 1 t) a) x) (* z (- y 1))) (* (- 2 (+ t y)) b))
  (* y (- b z))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)) <= ((double) INFINITY)) {
		tmp = ((((1.0 - t) * a) + x) - (z * (y - 1.0))) - ((2.0 - (t + y)) * b);
	} else {
		tmp = y * (b - z);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)) <= Double.POSITIVE_INFINITY) {
		tmp = ((((1.0 - t) * a) + x) - (z * (y - 1.0))) - ((2.0 - (t + y)) * b);
	} else {
		tmp = y * (b - z);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)) <= math.inf:
		tmp = ((((1.0 - t) * a) + x) - (z * (y - 1.0))) - ((2.0 - (t + y)) * b)
	else:
		tmp = y * (b - z)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) <= Inf)
		tmp = Float64(Float64(Float64(Float64(Float64(1.0 - t) * a) + x) - Float64(z * Float64(y - 1.0))) - Float64(Float64(2.0 - Float64(t + y)) * b));
	else
		tmp = Float64(y * Float64(b - z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)) <= Inf)
		tmp = ((((1.0 - t) * a) + x) - (z * (y - 1.0))) - ((2.0 - (t + y)) * b);
	else
		tmp = y * (b - z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(N[(x - N[(N[(y - 1), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(N[(N[(1 - t), $MachinePrecision] * a), $MachinePrecision] + x), $MachinePrecision] - N[(z * N[(y - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(2 - N[(t + y), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\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 \leq \infty:\\
\;\;\;\;\left(\left(\left(1 - t\right) \cdot a + x\right) - z \cdot \left(y - 1\right)\right) - \left(2 - \left(t + y\right)\right) \cdot b\\

\mathbf{else}:\\
\;\;\;\;y \cdot \left(b - z\right)\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < +inf.0

    1. Initial program 95.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. Step-by-step derivation
      1. lift-+.f64N/A

        \[\leadsto \color{blue}{\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-flipN/A

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

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

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

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

    1. Initial program 95.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. Taylor expanded in a around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 97.9% accurate, 0.5× speedup?

\[\begin{array}{l} t_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\\ \mathbf{if}\;t\_1 \leq \infty:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
(FPCore (x y z t a b)
  :precision binary64
  (let* ((t_1
        (+
         (- (- x (* (- y 1) z)) (* (- t 1) a))
         (* (- (+ y t) 2) b))))
  (if (<= t_1 INFINITY) t_1 (* y (- b z)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
	double tmp;
	if (t_1 <= ((double) INFINITY)) {
		tmp = t_1;
	} else {
		tmp = y * (b - z);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
	double tmp;
	if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else {
		tmp = y * (b - z);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
	tmp = 0
	if t_1 <= math.inf:
		tmp = t_1
	else:
		tmp = y * (b - z)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b))
	tmp = 0.0
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = Float64(y * Float64(b - z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
	tmp = 0.0;
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = y * (b - z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x - N[(N[(y - 1), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
t_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\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;y \cdot \left(b - z\right)\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < +inf.0

    1. Initial program 95.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 \]

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

    1. Initial program 95.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. Taylor expanded in a around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 86.6% accurate, 0.9× speedup?

\[\begin{array}{l} t_1 := \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{if}\;b \leq -10499999999999999928819961080797093752847938640412672:\\ \;\;\;\;\left(x - a \cdot \left(t - 1\right)\right) + t\_1\\ \mathbf{elif}\;b \leq 5700000000000000197784854593536:\\ \;\;\;\;\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + b \cdot y\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 - t\right) + t\_1\\ \end{array} \]
(FPCore (x y z t a b)
  :precision binary64
  (let* ((t_1 (* (- (+ y t) 2) b)))
  (if (<= b -10499999999999999928819961080797093752847938640412672)
    (+ (- x (* a (- t 1))) t_1)
    (if (<= b 5700000000000000197784854593536)
      (+ (- (- x (* (- y 1) z)) (* (- t 1) a)) (* b y))
      (+ (* a (- 1 t)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((y + t) - 2.0) * b;
	double tmp;
	if (b <= -1.05e+52) {
		tmp = (x - (a * (t - 1.0))) + t_1;
	} else if (b <= 5.7e+30) {
		tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (b * y);
	} else {
		tmp = (a * (1.0 - t)) + t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = ((y + t) - 2.0d0) * b
    if (b <= (-1.05d+52)) then
        tmp = (x - (a * (t - 1.0d0))) + t_1
    else if (b <= 5.7d+30) then
        tmp = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (b * y)
    else
        tmp = (a * (1.0d0 - t)) + t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((y + t) - 2.0) * b;
	double tmp;
	if (b <= -1.05e+52) {
		tmp = (x - (a * (t - 1.0))) + t_1;
	} else if (b <= 5.7e+30) {
		tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (b * y);
	} else {
		tmp = (a * (1.0 - t)) + t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((y + t) - 2.0) * b
	tmp = 0
	if b <= -1.05e+52:
		tmp = (x - (a * (t - 1.0))) + t_1
	elif b <= 5.7e+30:
		tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (b * y)
	else:
		tmp = (a * (1.0 - t)) + t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(y + t) - 2.0) * b)
	tmp = 0.0
	if (b <= -1.05e+52)
		tmp = Float64(Float64(x - Float64(a * Float64(t - 1.0))) + t_1);
	elseif (b <= 5.7e+30)
		tmp = Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(b * y));
	else
		tmp = Float64(Float64(a * Float64(1.0 - t)) + t_1);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = ((y + t) - 2.0) * b;
	tmp = 0.0;
	if (b <= -1.05e+52)
		tmp = (x - (a * (t - 1.0))) + t_1;
	elseif (b <= 5.7e+30)
		tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (b * y);
	else
		tmp = (a * (1.0 - t)) + t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y + t), $MachinePrecision] - 2), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -10499999999999999928819961080797093752847938640412672], N[(N[(x - N[(a * N[(t - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[b, 5700000000000000197784854593536], N[(N[(N[(x - N[(N[(y - 1), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(b * y), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(1 - t), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
t_1 := \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{if}\;b \leq -10499999999999999928819961080797093752847938640412672:\\
\;\;\;\;\left(x - a \cdot \left(t - 1\right)\right) + t\_1\\

\mathbf{elif}\;b \leq 5700000000000000197784854593536:\\
\;\;\;\;\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + b \cdot y\\

\mathbf{else}:\\
\;\;\;\;a \cdot \left(1 - t\right) + t\_1\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.05e52

    1. Initial program 95.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. Taylor expanded in a around inf

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

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

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

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

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

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

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

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

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

    if -1.05e52 < b < 5.7000000000000002e30

    1. Initial program 95.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. Taylor expanded in y around inf

      \[\leadsto \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \color{blue}{b \cdot y} \]
    3. Step-by-step derivation
      1. lower-*.f6477.8%

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

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

    if 5.7000000000000002e30 < b

    1. Initial program 95.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. Taylor expanded in a around inf

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

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

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

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

Alternative 4: 85.4% accurate, 1.0× speedup?

\[\begin{array}{l} t_1 := \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)\\ \mathbf{if}\;z \leq -2199999999999999885260233413848058330640843229616793674173628649221800130588415029452562203177085987418885945263028424059069640212480:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 249999999999999995000867086848550295417201298224252129547162077957693103656857181366197358732498109938694018795269259264:\\ \;\;\;\;\left(x - a \cdot \left(t - 1\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a b)
  :precision binary64
  (let* ((t_1 (- (+ x (* b (- (+ t y) 2))) (* z (- y 1)))))
  (if (<=
       z
       -2199999999999999885260233413848058330640843229616793674173628649221800130588415029452562203177085987418885945263028424059069640212480)
    t_1
    (if (<=
         z
         249999999999999995000867086848550295417201298224252129547162077957693103656857181366197358732498109938694018795269259264)
      (+ (- x (* a (- t 1))) (* (- (+ y t) 2) b))
      t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + (b * ((t + y) - 2.0))) - (z * (y - 1.0));
	double tmp;
	if (z <= -2.2e+132) {
		tmp = t_1;
	} else if (z <= 2.5e+119) {
		tmp = (x - (a * (t - 1.0))) + (((y + t) - 2.0) * b);
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x + (b * ((t + y) - 2.0d0))) - (z * (y - 1.0d0))
    if (z <= (-2.2d+132)) then
        tmp = t_1
    else if (z <= 2.5d+119) then
        tmp = (x - (a * (t - 1.0d0))) + (((y + t) - 2.0d0) * b)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + (b * ((t + y) - 2.0))) - (z * (y - 1.0));
	double tmp;
	if (z <= -2.2e+132) {
		tmp = t_1;
	} else if (z <= 2.5e+119) {
		tmp = (x - (a * (t - 1.0))) + (((y + t) - 2.0) * b);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x + (b * ((t + y) - 2.0))) - (z * (y - 1.0))
	tmp = 0
	if z <= -2.2e+132:
		tmp = t_1
	elif z <= 2.5e+119:
		tmp = (x - (a * (t - 1.0))) + (((y + t) - 2.0) * b)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + Float64(b * Float64(Float64(t + y) - 2.0))) - Float64(z * Float64(y - 1.0)))
	tmp = 0.0
	if (z <= -2.2e+132)
		tmp = t_1;
	elseif (z <= 2.5e+119)
		tmp = Float64(Float64(x - Float64(a * Float64(t - 1.0))) + Float64(Float64(Float64(y + t) - 2.0) * b));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (x + (b * ((t + y) - 2.0))) - (z * (y - 1.0));
	tmp = 0.0;
	if (z <= -2.2e+132)
		tmp = t_1;
	elseif (z <= 2.5e+119)
		tmp = (x - (a * (t - 1.0))) + (((y + t) - 2.0) * b);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(b * N[(N[(t + y), $MachinePrecision] - 2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * N[(y - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2199999999999999885260233413848058330640843229616793674173628649221800130588415029452562203177085987418885945263028424059069640212480], t$95$1, If[LessEqual[z, 249999999999999995000867086848550295417201298224252129547162077957693103656857181366197358732498109938694018795269259264], N[(N[(x - N[(a * N[(t - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)\\
\mathbf{if}\;z \leq -2199999999999999885260233413848058330640843229616793674173628649221800130588415029452562203177085987418885945263028424059069640212480:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 249999999999999995000867086848550295417201298224252129547162077957693103656857181366197358732498109938694018795269259264:\\
\;\;\;\;\left(x - a \cdot \left(t - 1\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.1999999999999999e132 or 2.5e119 < z

    1. Initial program 95.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. 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)} \]
    3. Step-by-step derivation
      1. lower--.f64N/A

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

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

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

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

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

        \[\leadsto \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \color{blue}{\left(y - 1\right)} \]
      7. lower--.f6473.8%

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

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

    if -2.1999999999999999e132 < z < 2.5e119

    1. Initial program 95.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. Taylor expanded in a around inf

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

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

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

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

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

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

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

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

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

Alternative 5: 82.5% accurate, 1.0× speedup?

\[\begin{array}{l} t_1 := \left(x - a \cdot \left(t - 1\right)\right) + b \cdot y\\ \mathbf{if}\;a \leq -37000000000000001098777444363636327681486635717165599167177722941531416978671695581500620980628105995830157385333382592595208025538432977972614384971354924283480249132168877205756841920176278592646542942967695862136832:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 4499999999999999969494269034627325894077687988748288:\\ \;\;\;\;\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a b)
  :precision binary64
  (let* ((t_1 (+ (- x (* a (- t 1))) (* b y))))
  (if (<=
       a
       -37000000000000001098777444363636327681486635717165599167177722941531416978671695581500620980628105995830157385333382592595208025538432977972614384971354924283480249132168877205756841920176278592646542942967695862136832)
    t_1
    (if (<= a 4499999999999999969494269034627325894077687988748288)
      (- (+ x (* b (- (+ t y) 2))) (* z (- y 1)))
      t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x - (a * (t - 1.0))) + (b * y);
	double tmp;
	if (a <= -3.7e+217) {
		tmp = t_1;
	} else if (a <= 4.5e+51) {
		tmp = (x + (b * ((t + y) - 2.0))) - (z * (y - 1.0));
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x - (a * (t - 1.0d0))) + (b * y)
    if (a <= (-3.7d+217)) then
        tmp = t_1
    else if (a <= 4.5d+51) then
        tmp = (x + (b * ((t + y) - 2.0d0))) - (z * (y - 1.0d0))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x - (a * (t - 1.0))) + (b * y);
	double tmp;
	if (a <= -3.7e+217) {
		tmp = t_1;
	} else if (a <= 4.5e+51) {
		tmp = (x + (b * ((t + y) - 2.0))) - (z * (y - 1.0));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x - (a * (t - 1.0))) + (b * y)
	tmp = 0
	if a <= -3.7e+217:
		tmp = t_1
	elif a <= 4.5e+51:
		tmp = (x + (b * ((t + y) - 2.0))) - (z * (y - 1.0))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x - Float64(a * Float64(t - 1.0))) + Float64(b * y))
	tmp = 0.0
	if (a <= -3.7e+217)
		tmp = t_1;
	elseif (a <= 4.5e+51)
		tmp = Float64(Float64(x + Float64(b * Float64(Float64(t + y) - 2.0))) - Float64(z * Float64(y - 1.0)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (x - (a * (t - 1.0))) + (b * y);
	tmp = 0.0;
	if (a <= -3.7e+217)
		tmp = t_1;
	elseif (a <= 4.5e+51)
		tmp = (x + (b * ((t + y) - 2.0))) - (z * (y - 1.0));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x - N[(a * N[(t - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -37000000000000001098777444363636327681486635717165599167177722941531416978671695581500620980628105995830157385333382592595208025538432977972614384971354924283480249132168877205756841920176278592646542942967695862136832], t$95$1, If[LessEqual[a, 4499999999999999969494269034627325894077687988748288], N[(N[(x + N[(b * N[(N[(t + y), $MachinePrecision] - 2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * N[(y - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \left(x - a \cdot \left(t - 1\right)\right) + b \cdot y\\
\mathbf{if}\;a \leq -37000000000000001098777444363636327681486635717165599167177722941531416978671695581500620980628105995830157385333382592595208025538432977972614384971354924283480249132168877205756841920176278592646542942967695862136832:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 4499999999999999969494269034627325894077687988748288:\\
\;\;\;\;\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.7000000000000001e217 or 4.5e51 < a

    1. Initial program 95.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. Taylor expanded in a around inf

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(x - a \cdot \left(t - 1\right)\right) + \color{blue}{b \cdot y} \]
    9. Step-by-step derivation
      1. lower-*.f6455.1%

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

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

    if -3.7000000000000001e217 < a < 4.5e51

    1. Initial program 95.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. 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)} \]
    3. Step-by-step derivation
      1. lower--.f64N/A

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

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

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

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

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

        \[\leadsto \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \color{blue}{\left(y - 1\right)} \]
      7. lower--.f6473.8%

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

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

Alternative 6: 73.1% accurate, 0.9× speedup?

\[\begin{array}{l} t_1 := \left(\left(x - y \cdot z\right) - a \cdot t\right) + b \cdot y\\ \mathbf{if}\;y \leq -2400000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq \frac{93076680405667}{21153791001287955166461289857048673274508949854856999017108761448780985319561963066406054734070889115122918784800747465736192}:\\ \;\;\;\;\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z\\ \mathbf{elif}\;y \leq 155000000000000009583071010805379319582021290744086528:\\ \;\;\;\;a \cdot \left(1 - t\right) + \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a b)
  :precision binary64
  (let* ((t_1 (+ (- (- x (* y z)) (* a t)) (* b y))))
  (if (<= y -2400000)
    t_1
    (if (<=
         y
         93076680405667/21153791001287955166461289857048673274508949854856999017108761448780985319561963066406054734070889115122918784800747465736192)
      (- (+ x (* b (- t 2))) (* -1 z))
      (if (<=
           y
           155000000000000009583071010805379319582021290744086528)
        (+ (* a (- 1 t)) (* (- (+ y t) 2) b))
        t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((x - (y * z)) - (a * t)) + (b * y);
	double tmp;
	if (y <= -2400000.0) {
		tmp = t_1;
	} else if (y <= 4.4e-111) {
		tmp = (x + (b * (t - 2.0))) - (-1.0 * z);
	} else if (y <= 1.55e+53) {
		tmp = (a * (1.0 - t)) + (((y + t) - 2.0) * b);
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = ((x - (y * z)) - (a * t)) + (b * y)
    if (y <= (-2400000.0d0)) then
        tmp = t_1
    else if (y <= 4.4d-111) then
        tmp = (x + (b * (t - 2.0d0))) - ((-1.0d0) * z)
    else if (y <= 1.55d+53) then
        tmp = (a * (1.0d0 - t)) + (((y + t) - 2.0d0) * b)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((x - (y * z)) - (a * t)) + (b * y);
	double tmp;
	if (y <= -2400000.0) {
		tmp = t_1;
	} else if (y <= 4.4e-111) {
		tmp = (x + (b * (t - 2.0))) - (-1.0 * z);
	} else if (y <= 1.55e+53) {
		tmp = (a * (1.0 - t)) + (((y + t) - 2.0) * b);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((x - (y * z)) - (a * t)) + (b * y)
	tmp = 0
	if y <= -2400000.0:
		tmp = t_1
	elif y <= 4.4e-111:
		tmp = (x + (b * (t - 2.0))) - (-1.0 * z)
	elif y <= 1.55e+53:
		tmp = (a * (1.0 - t)) + (((y + t) - 2.0) * b)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(x - Float64(y * z)) - Float64(a * t)) + Float64(b * y))
	tmp = 0.0
	if (y <= -2400000.0)
		tmp = t_1;
	elseif (y <= 4.4e-111)
		tmp = Float64(Float64(x + Float64(b * Float64(t - 2.0))) - Float64(-1.0 * z));
	elseif (y <= 1.55e+53)
		tmp = Float64(Float64(a * Float64(1.0 - t)) + Float64(Float64(Float64(y + t) - 2.0) * b));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = ((x - (y * z)) - (a * t)) + (b * y);
	tmp = 0.0;
	if (y <= -2400000.0)
		tmp = t_1;
	elseif (y <= 4.4e-111)
		tmp = (x + (b * (t - 2.0))) - (-1.0 * z);
	elseif (y <= 1.55e+53)
		tmp = (a * (1.0 - t)) + (((y + t) - 2.0) * b);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2400000], t$95$1, If[LessEqual[y, 93076680405667/21153791001287955166461289857048673274508949854856999017108761448780985319561963066406054734070889115122918784800747465736192], N[(N[(x + N[(b * N[(t - 2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-1 * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 155000000000000009583071010805379319582021290744086528], N[(N[(a * N[(1 - t), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := \left(\left(x - y \cdot z\right) - a \cdot t\right) + b \cdot y\\
\mathbf{if}\;y \leq -2400000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq \frac{93076680405667}{21153791001287955166461289857048673274508949854856999017108761448780985319561963066406054734070889115122918784800747465736192}:\\
\;\;\;\;\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z\\

\mathbf{elif}\;y \leq 155000000000000009583071010805379319582021290744086528:\\
\;\;\;\;a \cdot \left(1 - t\right) + \left(\left(y + t\right) - 2\right) \cdot b\\

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


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.4e6 or 1.5500000000000001e53 < y

    1. Initial program 95.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. Taylor expanded in y around inf

      \[\leadsto \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \color{blue}{b \cdot y} \]
    3. Step-by-step derivation
      1. lower-*.f6477.8%

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

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

      \[\leadsto \left(\left(x - \left(y - 1\right) \cdot z\right) - \color{blue}{a \cdot t}\right) + b \cdot y \]
    6. Step-by-step derivation
      1. lower-*.f6467.9%

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

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

      \[\leadsto \left(\left(x - \color{blue}{y \cdot z}\right) - a \cdot t\right) + b \cdot y \]
    9. Step-by-step derivation
      1. lower-*.f6458.4%

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

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

    if -2.4e6 < y < 4.3999999999999999e-111

    1. Initial program 95.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. 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)} \]
    3. Step-by-step derivation
      1. lower--.f64N/A

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

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

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

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

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

        \[\leadsto \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \color{blue}{\left(y - 1\right)} \]
      7. lower--.f6473.8%

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

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

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

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

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

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

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
      5. lower-*.f6446.5%

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
    7. Applied rewrites46.5%

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

    if 4.3999999999999999e-111 < y < 1.5500000000000001e53

    1. Initial program 95.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. Taylor expanded in a around inf

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

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

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

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

Alternative 7: 70.4% accurate, 1.2× speedup?

\[\begin{array}{l} t_1 := z \cdot \left(1 - y\right)\\ \mathbf{if}\;z \leq -7000000000000000195090964334063318778005827328862580230404690162898436096:\\ \;\;\;\;t\_1 - \left(2 - \left(t + y\right)\right) \cdot b\\ \mathbf{elif}\;z \leq 6400000000000000093636449476319187398208275122333792379383109037886696731207348581826560:\\ \;\;\;\;\left(x - a \cdot \left(t - 1\right)\right) + b \cdot y\\ \mathbf{else}:\\ \;\;\;\;t\_1 - \left(2 - t\right) \cdot b\\ \end{array} \]
(FPCore (x y z t a b)
  :precision binary64
  (let* ((t_1 (* z (- 1 y))))
  (if (<=
       z
       -7000000000000000195090964334063318778005827328862580230404690162898436096)
    (- t_1 (* (- 2 (+ t y)) b))
    (if (<=
         z
         6400000000000000093636449476319187398208275122333792379383109037886696731207348581826560)
      (+ (- x (* a (- t 1))) (* b y))
      (- t_1 (* (- 2 t) b))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z * (1.0 - y);
	double tmp;
	if (z <= -7e+72) {
		tmp = t_1 - ((2.0 - (t + y)) * b);
	} else if (z <= 6.4e+87) {
		tmp = (x - (a * (t - 1.0))) + (b * y);
	} else {
		tmp = t_1 - ((2.0 - t) * b);
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = z * (1.0d0 - y)
    if (z <= (-7d+72)) then
        tmp = t_1 - ((2.0d0 - (t + y)) * b)
    else if (z <= 6.4d+87) then
        tmp = (x - (a * (t - 1.0d0))) + (b * y)
    else
        tmp = t_1 - ((2.0d0 - t) * b)
    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 = z * (1.0 - y);
	double tmp;
	if (z <= -7e+72) {
		tmp = t_1 - ((2.0 - (t + y)) * b);
	} else if (z <= 6.4e+87) {
		tmp = (x - (a * (t - 1.0))) + (b * y);
	} else {
		tmp = t_1 - ((2.0 - t) * b);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z * (1.0 - y)
	tmp = 0
	if z <= -7e+72:
		tmp = t_1 - ((2.0 - (t + y)) * b)
	elif z <= 6.4e+87:
		tmp = (x - (a * (t - 1.0))) + (b * y)
	else:
		tmp = t_1 - ((2.0 - t) * b)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(z * Float64(1.0 - y))
	tmp = 0.0
	if (z <= -7e+72)
		tmp = Float64(t_1 - Float64(Float64(2.0 - Float64(t + y)) * b));
	elseif (z <= 6.4e+87)
		tmp = Float64(Float64(x - Float64(a * Float64(t - 1.0))) + Float64(b * y));
	else
		tmp = Float64(t_1 - Float64(Float64(2.0 - t) * b));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = z * (1.0 - y);
	tmp = 0.0;
	if (z <= -7e+72)
		tmp = t_1 - ((2.0 - (t + y)) * b);
	elseif (z <= 6.4e+87)
		tmp = (x - (a * (t - 1.0))) + (b * y);
	else
		tmp = t_1 - ((2.0 - t) * b);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(1 - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7000000000000000195090964334063318778005827328862580230404690162898436096], N[(t$95$1 - N[(N[(2 - N[(t + y), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6400000000000000093636449476319187398208275122333792379383109037886696731207348581826560], N[(N[(x - N[(a * N[(t - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * y), $MachinePrecision]), $MachinePrecision], N[(t$95$1 - N[(N[(2 - t), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_1 := z \cdot \left(1 - y\right)\\
\mathbf{if}\;z \leq -7000000000000000195090964334063318778005827328862580230404690162898436096:\\
\;\;\;\;t\_1 - \left(2 - \left(t + y\right)\right) \cdot b\\

\mathbf{elif}\;z \leq 6400000000000000093636449476319187398208275122333792379383109037886696731207348581826560:\\
\;\;\;\;\left(x - a \cdot \left(t - 1\right)\right) + b \cdot y\\

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


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.0000000000000002e72

    1. Initial program 95.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. Step-by-step derivation
      1. lift-+.f64N/A

        \[\leadsto \color{blue}{\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-flipN/A

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

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

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

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

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

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

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

    if -7.0000000000000002e72 < z < 6.4000000000000001e87

    1. Initial program 95.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. Taylor expanded in a around inf

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(x - a \cdot \left(t - 1\right)\right) + \color{blue}{b \cdot y} \]
    9. Step-by-step derivation
      1. lower-*.f6455.1%

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

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

    if 6.4000000000000001e87 < z

    1. Initial program 95.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. Step-by-step derivation
      1. lift-+.f64N/A

        \[\leadsto \color{blue}{\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-flipN/A

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

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

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

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

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

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

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

      \[\leadsto z \cdot \left(1 - y\right) - \left(2 - \color{blue}{t}\right) \cdot b \]
    8. Step-by-step derivation
      1. Applied rewrites49.7%

        \[\leadsto z \cdot \left(1 - y\right) - \left(2 - \color{blue}{t}\right) \cdot b \]
    9. Recombined 3 regimes into one program.
    10. Add Preprocessing

    Alternative 8: 70.3% accurate, 1.2× speedup?

    \[\begin{array}{l} t_1 := z \cdot \left(1 - y\right) - \left(2 - t\right) \cdot b\\ \mathbf{if}\;z \leq -7000000000000000195090964334063318778005827328862580230404690162898436096:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 6400000000000000093636449476319187398208275122333792379383109037886696731207348581826560:\\ \;\;\;\;\left(x - a \cdot \left(t - 1\right)\right) + b \cdot y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
    (FPCore (x y z t a b)
      :precision binary64
      (let* ((t_1 (- (* z (- 1 y)) (* (- 2 t) b))))
      (if (<=
           z
           -7000000000000000195090964334063318778005827328862580230404690162898436096)
        t_1
        (if (<=
             z
             6400000000000000093636449476319187398208275122333792379383109037886696731207348581826560)
          (+ (- x (* a (- t 1))) (* b y))
          t_1))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = (z * (1.0 - y)) - ((2.0 - t) * b);
    	double tmp;
    	if (z <= -7e+72) {
    		tmp = t_1;
    	} else if (z <= 6.4e+87) {
    		tmp = (x - (a * (t - 1.0))) + (b * y);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y, z, t, a, b)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8) :: t_1
        real(8) :: tmp
        t_1 = (z * (1.0d0 - y)) - ((2.0d0 - t) * b)
        if (z <= (-7d+72)) then
            tmp = t_1
        else if (z <= 6.4d+87) then
            tmp = (x - (a * (t - 1.0d0))) + (b * y)
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = (z * (1.0 - y)) - ((2.0 - t) * b);
    	double tmp;
    	if (z <= -7e+72) {
    		tmp = t_1;
    	} else if (z <= 6.4e+87) {
    		tmp = (x - (a * (t - 1.0))) + (b * y);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b):
    	t_1 = (z * (1.0 - y)) - ((2.0 - t) * b)
    	tmp = 0
    	if z <= -7e+72:
    		tmp = t_1
    	elif z <= 6.4e+87:
    		tmp = (x - (a * (t - 1.0))) + (b * y)
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a, b)
    	t_1 = Float64(Float64(z * Float64(1.0 - y)) - Float64(Float64(2.0 - t) * b))
    	tmp = 0.0
    	if (z <= -7e+72)
    		tmp = t_1;
    	elseif (z <= 6.4e+87)
    		tmp = Float64(Float64(x - Float64(a * Float64(t - 1.0))) + Float64(b * y));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b)
    	t_1 = (z * (1.0 - y)) - ((2.0 - t) * b);
    	tmp = 0.0;
    	if (z <= -7e+72)
    		tmp = t_1;
    	elseif (z <= 6.4e+87)
    		tmp = (x - (a * (t - 1.0))) + (b * y);
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * N[(1 - y), $MachinePrecision]), $MachinePrecision] - N[(N[(2 - t), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7000000000000000195090964334063318778005827328862580230404690162898436096], t$95$1, If[LessEqual[z, 6400000000000000093636449476319187398208275122333792379383109037886696731207348581826560], N[(N[(x - N[(a * N[(t - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    t_1 := z \cdot \left(1 - y\right) - \left(2 - t\right) \cdot b\\
    \mathbf{if}\;z \leq -7000000000000000195090964334063318778005827328862580230404690162898436096:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;z \leq 6400000000000000093636449476319187398208275122333792379383109037886696731207348581826560:\\
    \;\;\;\;\left(x - a \cdot \left(t - 1\right)\right) + b \cdot y\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < -7.0000000000000002e72 or 6.4000000000000001e87 < z

      1. Initial program 95.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. Step-by-step derivation
        1. lift-+.f64N/A

          \[\leadsto \color{blue}{\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-flipN/A

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

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

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

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

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

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

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

        \[\leadsto z \cdot \left(1 - y\right) - \left(2 - \color{blue}{t}\right) \cdot b \]
      8. Step-by-step derivation
        1. Applied rewrites49.7%

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

        if -7.0000000000000002e72 < z < 6.4000000000000001e87

        1. Initial program 95.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. Taylor expanded in a around inf

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(x - a \cdot \left(t - 1\right)\right) + \color{blue}{b \cdot y} \]
        9. Step-by-step derivation
          1. lower-*.f6455.1%

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

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

      Alternative 9: 65.6% accurate, 1.0× speedup?

      \[\begin{array}{l} t_1 := \left(x - a \cdot \left(t - 1\right)\right) + b \cdot y\\ \mathbf{if}\;y \leq -1960000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq \frac{5648671608315113}{5043456793138493339171717132818382567050206626619577173497381555743452386751642958261026080625269202023248382759272448}:\\ \;\;\;\;\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z\\ \mathbf{elif}\;y \leq 57000000000000001677201922670346782869445510907234784105077596356519050406796469980325465763994708026039730176:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
      (FPCore (x y z t a b)
        :precision binary64
        (let* ((t_1 (+ (- x (* a (- t 1))) (* b y))))
        (if (<= y -1960000)
          t_1
          (if (<=
               y
               5648671608315113/5043456793138493339171717132818382567050206626619577173497381555743452386751642958261026080625269202023248382759272448)
            (- (+ x (* b (- t 2))) (* -1 z))
            (if (<=
                 y
                 57000000000000001677201922670346782869445510907234784105077596356519050406796469980325465763994708026039730176)
              t_1
              (* y (- b z)))))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = (x - (a * (t - 1.0))) + (b * y);
      	double tmp;
      	if (y <= -1960000.0) {
      		tmp = t_1;
      	} else if (y <= 1.12e-102) {
      		tmp = (x + (b * (t - 2.0))) - (-1.0 * z);
      	} else if (y <= 5.7e+109) {
      		tmp = t_1;
      	} else {
      		tmp = y * (b - z);
      	}
      	return tmp;
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(x, y, z, t, a, b)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8) :: t_1
          real(8) :: tmp
          t_1 = (x - (a * (t - 1.0d0))) + (b * y)
          if (y <= (-1960000.0d0)) then
              tmp = t_1
          else if (y <= 1.12d-102) then
              tmp = (x + (b * (t - 2.0d0))) - ((-1.0d0) * z)
          else if (y <= 5.7d+109) then
              tmp = t_1
          else
              tmp = y * (b - z)
          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 = (x - (a * (t - 1.0))) + (b * y);
      	double tmp;
      	if (y <= -1960000.0) {
      		tmp = t_1;
      	} else if (y <= 1.12e-102) {
      		tmp = (x + (b * (t - 2.0))) - (-1.0 * z);
      	} else if (y <= 5.7e+109) {
      		tmp = t_1;
      	} else {
      		tmp = y * (b - z);
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = (x - (a * (t - 1.0))) + (b * y)
      	tmp = 0
      	if y <= -1960000.0:
      		tmp = t_1
      	elif y <= 1.12e-102:
      		tmp = (x + (b * (t - 2.0))) - (-1.0 * z)
      	elif y <= 5.7e+109:
      		tmp = t_1
      	else:
      		tmp = y * (b - z)
      	return tmp
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(Float64(x - Float64(a * Float64(t - 1.0))) + Float64(b * y))
      	tmp = 0.0
      	if (y <= -1960000.0)
      		tmp = t_1;
      	elseif (y <= 1.12e-102)
      		tmp = Float64(Float64(x + Float64(b * Float64(t - 2.0))) - Float64(-1.0 * z));
      	elseif (y <= 5.7e+109)
      		tmp = t_1;
      	else
      		tmp = Float64(y * Float64(b - z));
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	t_1 = (x - (a * (t - 1.0))) + (b * y);
      	tmp = 0.0;
      	if (y <= -1960000.0)
      		tmp = t_1;
      	elseif (y <= 1.12e-102)
      		tmp = (x + (b * (t - 2.0))) - (-1.0 * z);
      	elseif (y <= 5.7e+109)
      		tmp = t_1;
      	else
      		tmp = y * (b - z);
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x - N[(a * N[(t - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1960000], t$95$1, If[LessEqual[y, 5648671608315113/5043456793138493339171717132818382567050206626619577173497381555743452386751642958261026080625269202023248382759272448], N[(N[(x + N[(b * N[(t - 2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-1 * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 57000000000000001677201922670346782869445510907234784105077596356519050406796469980325465763994708026039730176], t$95$1, N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]]]]]
      
      \begin{array}{l}
      t_1 := \left(x - a \cdot \left(t - 1\right)\right) + b \cdot y\\
      \mathbf{if}\;y \leq -1960000:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;y \leq \frac{5648671608315113}{5043456793138493339171717132818382567050206626619577173497381555743452386751642958261026080625269202023248382759272448}:\\
      \;\;\;\;\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z\\
      
      \mathbf{elif}\;y \leq 57000000000000001677201922670346782869445510907234784105077596356519050406796469980325465763994708026039730176:\\
      \;\;\;\;t\_1\\
      
      \mathbf{else}:\\
      \;\;\;\;y \cdot \left(b - z\right)\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if y < -1.96e6 or 1.1200000000000001e-102 < y < 5.7000000000000002e109

        1. Initial program 95.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. Taylor expanded in a around inf

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(x - a \cdot \left(t - 1\right)\right) + \color{blue}{b \cdot y} \]
        9. Step-by-step derivation
          1. lower-*.f6455.1%

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

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

        if -1.96e6 < y < 1.1200000000000001e-102

        1. Initial program 95.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. 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)} \]
        3. Step-by-step derivation
          1. lower--.f64N/A

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

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

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

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

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

            \[\leadsto \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \color{blue}{\left(y - 1\right)} \]
          7. lower--.f6473.8%

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

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

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

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

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

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

            \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
          5. lower-*.f6446.5%

            \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
        7. Applied rewrites46.5%

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

        if 5.7000000000000002e109 < y

        1. Initial program 95.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. Taylor expanded in a around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 10: 65.0% accurate, 1.0× speedup?

      \[\begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -4800000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq \frac{4160851854339257}{2521728396569246669585858566409191283525103313309788586748690777871726193375821479130513040312634601011624191379636224}:\\ \;\;\;\;\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z\\ \mathbf{elif}\;y \leq 164999999999999989746501660396935349620099883912192960188787403991810048:\\ \;\;\;\;a \cdot \left(1 - t\right) + \left(y - 2\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
      (FPCore (x y z t a b)
        :precision binary64
        (let* ((t_1 (* y (- b z))))
        (if (<= y -4800000)
          t_1
          (if (<=
               y
               4160851854339257/2521728396569246669585858566409191283525103313309788586748690777871726193375821479130513040312634601011624191379636224)
            (- (+ x (* b (- t 2))) (* -1 z))
            (if (<=
                 y
                 164999999999999989746501660396935349620099883912192960188787403991810048)
              (+ (* a (- 1 t)) (* (- y 2) b))
              t_1)))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = y * (b - z);
      	double tmp;
      	if (y <= -4800000.0) {
      		tmp = t_1;
      	} else if (y <= 1.65e-102) {
      		tmp = (x + (b * (t - 2.0))) - (-1.0 * z);
      	} else if (y <= 1.65e+71) {
      		tmp = (a * (1.0 - t)) + ((y - 2.0) * b);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(x, y, z, t, a, b)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8) :: t_1
          real(8) :: tmp
          t_1 = y * (b - z)
          if (y <= (-4800000.0d0)) then
              tmp = t_1
          else if (y <= 1.65d-102) then
              tmp = (x + (b * (t - 2.0d0))) - ((-1.0d0) * z)
          else if (y <= 1.65d+71) then
              tmp = (a * (1.0d0 - t)) + ((y - 2.0d0) * b)
          else
              tmp = t_1
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = y * (b - z);
      	double tmp;
      	if (y <= -4800000.0) {
      		tmp = t_1;
      	} else if (y <= 1.65e-102) {
      		tmp = (x + (b * (t - 2.0))) - (-1.0 * z);
      	} else if (y <= 1.65e+71) {
      		tmp = (a * (1.0 - t)) + ((y - 2.0) * b);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = y * (b - z)
      	tmp = 0
      	if y <= -4800000.0:
      		tmp = t_1
      	elif y <= 1.65e-102:
      		tmp = (x + (b * (t - 2.0))) - (-1.0 * z)
      	elif y <= 1.65e+71:
      		tmp = (a * (1.0 - t)) + ((y - 2.0) * b)
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(y * Float64(b - z))
      	tmp = 0.0
      	if (y <= -4800000.0)
      		tmp = t_1;
      	elseif (y <= 1.65e-102)
      		tmp = Float64(Float64(x + Float64(b * Float64(t - 2.0))) - Float64(-1.0 * z));
      	elseif (y <= 1.65e+71)
      		tmp = Float64(Float64(a * Float64(1.0 - t)) + Float64(Float64(y - 2.0) * b));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	t_1 = y * (b - z);
      	tmp = 0.0;
      	if (y <= -4800000.0)
      		tmp = t_1;
      	elseif (y <= 1.65e-102)
      		tmp = (x + (b * (t - 2.0))) - (-1.0 * z);
      	elseif (y <= 1.65e+71)
      		tmp = (a * (1.0 - t)) + ((y - 2.0) * b);
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4800000], t$95$1, If[LessEqual[y, 4160851854339257/2521728396569246669585858566409191283525103313309788586748690777871726193375821479130513040312634601011624191379636224], N[(N[(x + N[(b * N[(t - 2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-1 * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 164999999999999989746501660396935349620099883912192960188787403991810048], N[(N[(a * N[(1 - t), $MachinePrecision]), $MachinePrecision] + N[(N[(y - 2), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
      
      \begin{array}{l}
      t_1 := y \cdot \left(b - z\right)\\
      \mathbf{if}\;y \leq -4800000:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;y \leq \frac{4160851854339257}{2521728396569246669585858566409191283525103313309788586748690777871726193375821479130513040312634601011624191379636224}:\\
      \;\;\;\;\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z\\
      
      \mathbf{elif}\;y \leq 164999999999999989746501660396935349620099883912192960188787403991810048:\\
      \;\;\;\;a \cdot \left(1 - t\right) + \left(y - 2\right) \cdot b\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if y < -4.8e6 or 1.6499999999999999e71 < y

        1. Initial program 95.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. Taylor expanded in a around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -4.8e6 < y < 1.65e-102

        1. Initial program 95.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. 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)} \]
        3. Step-by-step derivation
          1. lower--.f64N/A

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

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

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

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

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

            \[\leadsto \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \color{blue}{\left(y - 1\right)} \]
          7. lower--.f6473.8%

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

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

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

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

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

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

            \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
          5. lower-*.f6446.5%

            \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
        7. Applied rewrites46.5%

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

        if 1.65e-102 < y < 1.6499999999999999e71

        1. Initial program 95.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. Taylor expanded in a around inf

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

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

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

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

          \[\leadsto a \cdot \left(1 - t\right) + \color{blue}{\left(y - 2\right)} \cdot b \]
        6. Step-by-step derivation
          1. lower--.f6448.1%

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

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

      Alternative 11: 64.1% accurate, 1.2× speedup?

      \[\begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -4800000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq \frac{1891296297426935}{2521728396569246669585858566409191283525103313309788586748690777871726193375821479130513040312634601011624191379636224}:\\ \;\;\;\;\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z\\ \mathbf{elif}\;y \leq 164999999999999989746501660396935349620099883912192960188787403991810048:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
      (FPCore (x y z t a b)
        :precision binary64
        (let* ((t_1 (* y (- b z))))
        (if (<= y -4800000)
          t_1
          (if (<=
               y
               1891296297426935/2521728396569246669585858566409191283525103313309788586748690777871726193375821479130513040312634601011624191379636224)
            (- (+ x (* b (- t 2))) (* -1 z))
            (if (<=
                 y
                 164999999999999989746501660396935349620099883912192960188787403991810048)
              (* t (- b a))
              t_1)))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = y * (b - z);
      	double tmp;
      	if (y <= -4800000.0) {
      		tmp = t_1;
      	} else if (y <= 7.5e-103) {
      		tmp = (x + (b * (t - 2.0))) - (-1.0 * z);
      	} else if (y <= 1.65e+71) {
      		tmp = t * (b - a);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(x, y, z, t, a, b)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8) :: t_1
          real(8) :: tmp
          t_1 = y * (b - z)
          if (y <= (-4800000.0d0)) then
              tmp = t_1
          else if (y <= 7.5d-103) then
              tmp = (x + (b * (t - 2.0d0))) - ((-1.0d0) * z)
          else if (y <= 1.65d+71) then
              tmp = t * (b - a)
          else
              tmp = t_1
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = y * (b - z);
      	double tmp;
      	if (y <= -4800000.0) {
      		tmp = t_1;
      	} else if (y <= 7.5e-103) {
      		tmp = (x + (b * (t - 2.0))) - (-1.0 * z);
      	} else if (y <= 1.65e+71) {
      		tmp = t * (b - a);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = y * (b - z)
      	tmp = 0
      	if y <= -4800000.0:
      		tmp = t_1
      	elif y <= 7.5e-103:
      		tmp = (x + (b * (t - 2.0))) - (-1.0 * z)
      	elif y <= 1.65e+71:
      		tmp = t * (b - a)
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(y * Float64(b - z))
      	tmp = 0.0
      	if (y <= -4800000.0)
      		tmp = t_1;
      	elseif (y <= 7.5e-103)
      		tmp = Float64(Float64(x + Float64(b * Float64(t - 2.0))) - Float64(-1.0 * z));
      	elseif (y <= 1.65e+71)
      		tmp = Float64(t * Float64(b - a));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	t_1 = y * (b - z);
      	tmp = 0.0;
      	if (y <= -4800000.0)
      		tmp = t_1;
      	elseif (y <= 7.5e-103)
      		tmp = (x + (b * (t - 2.0))) - (-1.0 * z);
      	elseif (y <= 1.65e+71)
      		tmp = t * (b - a);
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4800000], t$95$1, If[LessEqual[y, 1891296297426935/2521728396569246669585858566409191283525103313309788586748690777871726193375821479130513040312634601011624191379636224], N[(N[(x + N[(b * N[(t - 2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-1 * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 164999999999999989746501660396935349620099883912192960188787403991810048], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
      
      \begin{array}{l}
      t_1 := y \cdot \left(b - z\right)\\
      \mathbf{if}\;y \leq -4800000:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;y \leq \frac{1891296297426935}{2521728396569246669585858566409191283525103313309788586748690777871726193375821479130513040312634601011624191379636224}:\\
      \;\;\;\;\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z\\
      
      \mathbf{elif}\;y \leq 164999999999999989746501660396935349620099883912192960188787403991810048:\\
      \;\;\;\;t \cdot \left(b - a\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if y < -4.8e6 or 1.6499999999999999e71 < y

        1. Initial program 95.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. Taylor expanded in a around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -4.8e6 < y < 7.5e-103

        1. Initial program 95.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. 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)} \]
        3. Step-by-step derivation
          1. lower--.f64N/A

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

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

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

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

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

            \[\leadsto \left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \color{blue}{\left(y - 1\right)} \]
          7. lower--.f6473.8%

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

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

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

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

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

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

            \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
          5. lower-*.f6446.5%

            \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z \]
        7. Applied rewrites46.5%

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

        if 7.5e-103 < y < 1.6499999999999999e71

        1. Initial program 95.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. Taylor expanded in t around inf

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

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

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

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

      Alternative 12: 57.0% accurate, 1.4× speedup?

      \[\begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -3400000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq \frac{2420859260706477}{80695308690215893426747474125094121072803306025913234775958104891895238188026287332176417290004307232371974124148359168}:\\ \;\;\;\;z - \left(2 - \left(t + y\right)\right) \cdot b\\ \mathbf{elif}\;y \leq 164999999999999989746501660396935349620099883912192960188787403991810048:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
      (FPCore (x y z t a b)
        :precision binary64
        (let* ((t_1 (* y (- b z))))
        (if (<= y -3400000000)
          t_1
          (if (<=
               y
               2420859260706477/80695308690215893426747474125094121072803306025913234775958104891895238188026287332176417290004307232371974124148359168)
            (- z (* (- 2 (+ t y)) b))
            (if (<=
                 y
                 164999999999999989746501660396935349620099883912192960188787403991810048)
              (* t (- b a))
              t_1)))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = y * (b - z);
      	double tmp;
      	if (y <= -3400000000.0) {
      		tmp = t_1;
      	} else if (y <= 3e-104) {
      		tmp = z - ((2.0 - (t + y)) * b);
      	} else if (y <= 1.65e+71) {
      		tmp = t * (b - a);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(x, y, z, t, a, b)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8) :: t_1
          real(8) :: tmp
          t_1 = y * (b - z)
          if (y <= (-3400000000.0d0)) then
              tmp = t_1
          else if (y <= 3d-104) then
              tmp = z - ((2.0d0 - (t + y)) * b)
          else if (y <= 1.65d+71) then
              tmp = t * (b - a)
          else
              tmp = t_1
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = y * (b - z);
      	double tmp;
      	if (y <= -3400000000.0) {
      		tmp = t_1;
      	} else if (y <= 3e-104) {
      		tmp = z - ((2.0 - (t + y)) * b);
      	} else if (y <= 1.65e+71) {
      		tmp = t * (b - a);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = y * (b - z)
      	tmp = 0
      	if y <= -3400000000.0:
      		tmp = t_1
      	elif y <= 3e-104:
      		tmp = z - ((2.0 - (t + y)) * b)
      	elif y <= 1.65e+71:
      		tmp = t * (b - a)
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(y * Float64(b - z))
      	tmp = 0.0
      	if (y <= -3400000000.0)
      		tmp = t_1;
      	elseif (y <= 3e-104)
      		tmp = Float64(z - Float64(Float64(2.0 - Float64(t + y)) * b));
      	elseif (y <= 1.65e+71)
      		tmp = Float64(t * Float64(b - a));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	t_1 = y * (b - z);
      	tmp = 0.0;
      	if (y <= -3400000000.0)
      		tmp = t_1;
      	elseif (y <= 3e-104)
      		tmp = z - ((2.0 - (t + y)) * b);
      	elseif (y <= 1.65e+71)
      		tmp = t * (b - a);
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3400000000], t$95$1, If[LessEqual[y, 2420859260706477/80695308690215893426747474125094121072803306025913234775958104891895238188026287332176417290004307232371974124148359168], N[(z - N[(N[(2 - N[(t + y), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 164999999999999989746501660396935349620099883912192960188787403991810048], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
      
      \begin{array}{l}
      t_1 := y \cdot \left(b - z\right)\\
      \mathbf{if}\;y \leq -3400000000:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;y \leq \frac{2420859260706477}{80695308690215893426747474125094121072803306025913234775958104891895238188026287332176417290004307232371974124148359168}:\\
      \;\;\;\;z - \left(2 - \left(t + y\right)\right) \cdot b\\
      
      \mathbf{elif}\;y \leq 164999999999999989746501660396935349620099883912192960188787403991810048:\\
      \;\;\;\;t \cdot \left(b - a\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if y < -3.4e9 or 1.6499999999999999e71 < y

        1. Initial program 95.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. Taylor expanded in a around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -3.4e9 < y < 3.0000000000000002e-104

        1. Initial program 95.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. Step-by-step derivation
          1. lift-+.f64N/A

            \[\leadsto \color{blue}{\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-flipN/A

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

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

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

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

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

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

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

          \[\leadsto z - \left(2 - \left(t + y\right)\right) \cdot b \]
        8. Step-by-step derivation
          1. Applied rewrites46.8%

            \[\leadsto z - \left(2 - \left(t + y\right)\right) \cdot b \]

          if 3.0000000000000002e-104 < y < 1.6499999999999999e71

          1. Initial program 95.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. Taylor expanded in t around inf

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

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

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

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

        Alternative 13: 55.5% accurate, 1.1× speedup?

        \[\begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ t_2 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -23999999999999998558342357087346829272603695633019749798744112831287262393139200:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq \frac{-1478383000718271}{1606938044258990275541962092341162602522202993782792835301376}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq \frac{3302638007025703}{36695977855841144185773134324833391052745039826692497979801421430190766017415756929120296849762010984873984}:\\ \;\;\;\;a + \left(y - 2\right) \cdot b\\ \mathbf{elif}\;t \leq \frac{1770887431076117}{1180591620717411303424}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \]
        (FPCore (x y z t a b)
          :precision binary64
          (let* ((t_1 (* y (- b z))) (t_2 (* t (- b a))))
          (if (<=
               t
               -23999999999999998558342357087346829272603695633019749798744112831287262393139200)
            t_2
            (if (<=
                 t
                 -1478383000718271/1606938044258990275541962092341162602522202993782792835301376)
              t_1
              (if (<=
                   t
                   3302638007025703/36695977855841144185773134324833391052745039826692497979801421430190766017415756929120296849762010984873984)
                (+ a (* (- y 2) b))
                (if (<= t 1770887431076117/1180591620717411303424)
                  t_1
                  t_2))))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double t_1 = y * (b - z);
        	double t_2 = t * (b - a);
        	double tmp;
        	if (t <= -2.4e+79) {
        		tmp = t_2;
        	} else if (t <= -9.2e-46) {
        		tmp = t_1;
        	} else if (t <= 9e-92) {
        		tmp = a + ((y - 2.0) * b);
        	} else if (t <= 1.5e-6) {
        		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 = y * (b - z)
            t_2 = t * (b - a)
            if (t <= (-2.4d+79)) then
                tmp = t_2
            else if (t <= (-9.2d-46)) then
                tmp = t_1
            else if (t <= 9d-92) then
                tmp = a + ((y - 2.0d0) * b)
            else if (t <= 1.5d-6) 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 = y * (b - z);
        	double t_2 = t * (b - a);
        	double tmp;
        	if (t <= -2.4e+79) {
        		tmp = t_2;
        	} else if (t <= -9.2e-46) {
        		tmp = t_1;
        	} else if (t <= 9e-92) {
        		tmp = a + ((y - 2.0) * b);
        	} else if (t <= 1.5e-6) {
        		tmp = t_1;
        	} else {
        		tmp = t_2;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t, a, b):
        	t_1 = y * (b - z)
        	t_2 = t * (b - a)
        	tmp = 0
        	if t <= -2.4e+79:
        		tmp = t_2
        	elif t <= -9.2e-46:
        		tmp = t_1
        	elif t <= 9e-92:
        		tmp = a + ((y - 2.0) * b)
        	elif t <= 1.5e-6:
        		tmp = t_1
        	else:
        		tmp = t_2
        	return tmp
        
        function code(x, y, z, t, a, b)
        	t_1 = Float64(y * Float64(b - z))
        	t_2 = Float64(t * Float64(b - a))
        	tmp = 0.0
        	if (t <= -2.4e+79)
        		tmp = t_2;
        	elseif (t <= -9.2e-46)
        		tmp = t_1;
        	elseif (t <= 9e-92)
        		tmp = Float64(a + Float64(Float64(y - 2.0) * b));
        	elseif (t <= 1.5e-6)
        		tmp = t_1;
        	else
        		tmp = t_2;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t, a, b)
        	t_1 = y * (b - z);
        	t_2 = t * (b - a);
        	tmp = 0.0;
        	if (t <= -2.4e+79)
        		tmp = t_2;
        	elseif (t <= -9.2e-46)
        		tmp = t_1;
        	elseif (t <= 9e-92)
        		tmp = a + ((y - 2.0) * b);
        	elseif (t <= 1.5e-6)
        		tmp = t_1;
        	else
        		tmp = t_2;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -23999999999999998558342357087346829272603695633019749798744112831287262393139200], t$95$2, If[LessEqual[t, -1478383000718271/1606938044258990275541962092341162602522202993782792835301376], t$95$1, If[LessEqual[t, 3302638007025703/36695977855841144185773134324833391052745039826692497979801421430190766017415756929120296849762010984873984], N[(a + N[(N[(y - 2), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1770887431076117/1180591620717411303424], t$95$1, t$95$2]]]]]]
        
        \begin{array}{l}
        t_1 := y \cdot \left(b - z\right)\\
        t_2 := t \cdot \left(b - a\right)\\
        \mathbf{if}\;t \leq -23999999999999998558342357087346829272603695633019749798744112831287262393139200:\\
        \;\;\;\;t\_2\\
        
        \mathbf{elif}\;t \leq \frac{-1478383000718271}{1606938044258990275541962092341162602522202993782792835301376}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t \leq \frac{3302638007025703}{36695977855841144185773134324833391052745039826692497979801421430190766017415756929120296849762010984873984}:\\
        \;\;\;\;a + \left(y - 2\right) \cdot b\\
        
        \mathbf{elif}\;t \leq \frac{1770887431076117}{1180591620717411303424}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_2\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if t < -2.3999999999999999e79 or 1.5e-6 < t

          1. Initial program 95.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. Taylor expanded in t around inf

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

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

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

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

          if -2.3999999999999999e79 < t < -9.1999999999999997e-46 or 9.0000000000000001e-92 < t < 1.5e-6

          1. Initial program 95.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. Taylor expanded in a around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -9.1999999999999997e-46 < t < 9.0000000000000001e-92

          1. Initial program 95.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. Taylor expanded in a around inf

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

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

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

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

            \[\leadsto a \cdot \left(1 - t\right) + \color{blue}{\left(y - 2\right)} \cdot b \]
          6. Step-by-step derivation
            1. lower--.f6448.1%

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

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

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

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

          Alternative 14: 51.0% accurate, 1.8× speedup?

          \[\begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -255000000000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 164999999999999989746501660396935349620099883912192960188787403991810048:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
          (FPCore (x y z t a b)
            :precision binary64
            (let* ((t_1 (* y (- b z))))
            (if (<= y -255000000000000000)
              t_1
              (if (<=
                   y
                   164999999999999989746501660396935349620099883912192960188787403991810048)
                (* t (- b a))
                t_1))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double t_1 = y * (b - z);
          	double tmp;
          	if (y <= -2.55e+17) {
          		tmp = t_1;
          	} else if (y <= 1.65e+71) {
          		tmp = t * (b - a);
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          module fmin_fmax_functions
              implicit none
              private
              public fmax
              public fmin
          
              interface fmax
                  module procedure fmax88
                  module procedure fmax44
                  module procedure fmax84
                  module procedure fmax48
              end interface
              interface fmin
                  module procedure fmin88
                  module procedure fmin44
                  module procedure fmin84
                  module procedure fmin48
              end interface
          contains
              real(8) function fmax88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(4) function fmax44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(8) function fmax84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmax48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
              end function
              real(8) function fmin88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(4) function fmin44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(8) function fmin84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmin48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
              end function
          end module
          
          real(8) function code(x, y, z, t, a, b)
          use fmin_fmax_functions
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              real(8), intent (in) :: a
              real(8), intent (in) :: b
              real(8) :: t_1
              real(8) :: tmp
              t_1 = y * (b - z)
              if (y <= (-2.55d+17)) then
                  tmp = t_1
              else if (y <= 1.65d+71) then
                  tmp = t * (b - a)
              else
                  tmp = t_1
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t, double a, double b) {
          	double t_1 = y * (b - z);
          	double tmp;
          	if (y <= -2.55e+17) {
          		tmp = t_1;
          	} else if (y <= 1.65e+71) {
          		tmp = t * (b - a);
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a, b):
          	t_1 = y * (b - z)
          	tmp = 0
          	if y <= -2.55e+17:
          		tmp = t_1
          	elif y <= 1.65e+71:
          		tmp = t * (b - a)
          	else:
          		tmp = t_1
          	return tmp
          
          function code(x, y, z, t, a, b)
          	t_1 = Float64(y * Float64(b - z))
          	tmp = 0.0
          	if (y <= -2.55e+17)
          		tmp = t_1;
          	elseif (y <= 1.65e+71)
          		tmp = Float64(t * Float64(b - a));
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a, b)
          	t_1 = y * (b - z);
          	tmp = 0.0;
          	if (y <= -2.55e+17)
          		tmp = t_1;
          	elseif (y <= 1.65e+71)
          		tmp = t * (b - a);
          	else
          		tmp = t_1;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -255000000000000000], t$95$1, If[LessEqual[y, 164999999999999989746501660396935349620099883912192960188787403991810048], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          t_1 := y \cdot \left(b - z\right)\\
          \mathbf{if}\;y \leq -255000000000000000:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;y \leq 164999999999999989746501660396935349620099883912192960188787403991810048:\\
          \;\;\;\;t \cdot \left(b - a\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if y < -2.55e17 or 1.6499999999999999e71 < y

            1. Initial program 95.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. Taylor expanded in a around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -2.55e17 < y < 1.6499999999999999e71

            1. Initial program 95.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. Taylor expanded in t around inf

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

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

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

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

          Alternative 15: 41.8% accurate, 1.8× speedup?

          \[\begin{array}{l} t_1 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq \frac{-8341588155340941}{604462909807314587353088}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq \frac{1470053796651389}{154742504910672534362390528}:\\ \;\;\;\;y \cdot b\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
          (FPCore (x y z t a b)
            :precision binary64
            (let* ((t_1 (* t (- b a))))
            (if (<= t -8341588155340941/604462909807314587353088)
              t_1
              (if (<= t 1470053796651389/154742504910672534362390528)
                (* y b)
                t_1))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double t_1 = t * (b - a);
          	double tmp;
          	if (t <= -1.38e-8) {
          		tmp = t_1;
          	} else if (t <= 9.5e-12) {
          		tmp = y * b;
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          module fmin_fmax_functions
              implicit none
              private
              public fmax
              public fmin
          
              interface fmax
                  module procedure fmax88
                  module procedure fmax44
                  module procedure fmax84
                  module procedure fmax48
              end interface
              interface fmin
                  module procedure fmin88
                  module procedure fmin44
                  module procedure fmin84
                  module procedure fmin48
              end interface
          contains
              real(8) function fmax88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(4) function fmax44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(8) function fmax84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmax48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
              end function
              real(8) function fmin88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(4) function fmin44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(8) function fmin84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmin48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
              end function
          end module
          
          real(8) function code(x, y, z, t, a, b)
          use fmin_fmax_functions
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              real(8), intent (in) :: a
              real(8), intent (in) :: b
              real(8) :: t_1
              real(8) :: tmp
              t_1 = t * (b - a)
              if (t <= (-1.38d-8)) then
                  tmp = t_1
              else if (t <= 9.5d-12) then
                  tmp = y * b
              else
                  tmp = t_1
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t, double a, double b) {
          	double t_1 = t * (b - a);
          	double tmp;
          	if (t <= -1.38e-8) {
          		tmp = t_1;
          	} else if (t <= 9.5e-12) {
          		tmp = y * b;
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a, b):
          	t_1 = t * (b - a)
          	tmp = 0
          	if t <= -1.38e-8:
          		tmp = t_1
          	elif t <= 9.5e-12:
          		tmp = y * b
          	else:
          		tmp = t_1
          	return tmp
          
          function code(x, y, z, t, a, b)
          	t_1 = Float64(t * Float64(b - a))
          	tmp = 0.0
          	if (t <= -1.38e-8)
          		tmp = t_1;
          	elseif (t <= 9.5e-12)
          		tmp = Float64(y * b);
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a, b)
          	t_1 = t * (b - a);
          	tmp = 0.0;
          	if (t <= -1.38e-8)
          		tmp = t_1;
          	elseif (t <= 9.5e-12)
          		tmp = y * b;
          	else
          		tmp = t_1;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8341588155340941/604462909807314587353088], t$95$1, If[LessEqual[t, 1470053796651389/154742504910672534362390528], N[(y * b), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          t_1 := t \cdot \left(b - a\right)\\
          \mathbf{if}\;t \leq \frac{-8341588155340941}{604462909807314587353088}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;t \leq \frac{1470053796651389}{154742504910672534362390528}:\\
          \;\;\;\;y \cdot b\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if t < -1.3799999999999999e-8 or 9.4999999999999995e-12 < t

            1. Initial program 95.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. Taylor expanded in t around inf

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

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

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

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

            if -1.3799999999999999e-8 < t < 9.4999999999999995e-12

            1. Initial program 95.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. Taylor expanded in a around inf

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{y \cdot \left(b - z\right)} \]
            11. Taylor expanded in z around 0

              \[\leadsto y \cdot b \]
            12. Step-by-step derivation
              1. Applied rewrites17.6%

                \[\leadsto y \cdot b \]
            13. Recombined 2 regimes into one program.
            14. Add Preprocessing

            Alternative 16: 27.5% accurate, 2.1× speedup?

            \[\begin{array}{l} \mathbf{if}\;y \leq -4800000:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq 160000000000000011605029821044677620185339905543443512882913624876646400:\\ \;\;\;\;t \cdot b\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
            (FPCore (x y z t a b)
              :precision binary64
              (if (<= y -4800000)
              (* y b)
              (if (<=
                   y
                   160000000000000011605029821044677620185339905543443512882913624876646400)
                (* t b)
                (* y b))))
            double code(double x, double y, double z, double t, double a, double b) {
            	double tmp;
            	if (y <= -4800000.0) {
            		tmp = y * b;
            	} else if (y <= 1.6e+71) {
            		tmp = t * b;
            	} else {
            		tmp = y * b;
            	}
            	return tmp;
            }
            
            module fmin_fmax_functions
                implicit none
                private
                public fmax
                public fmin
            
                interface fmax
                    module procedure fmax88
                    module procedure fmax44
                    module procedure fmax84
                    module procedure fmax48
                end interface
                interface fmin
                    module procedure fmin88
                    module procedure fmin44
                    module procedure fmin84
                    module procedure fmin48
                end interface
            contains
                real(8) function fmax88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(4) function fmax44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(8) function fmax84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmax48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                end function
                real(8) function fmin88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(4) function fmin44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(8) function fmin84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmin48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                end function
            end module
            
            real(8) function code(x, y, z, t, a, b)
            use fmin_fmax_functions
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8), intent (in) :: a
                real(8), intent (in) :: b
                real(8) :: tmp
                if (y <= (-4800000.0d0)) then
                    tmp = y * b
                else if (y <= 1.6d+71) then
                    tmp = t * b
                else
                    tmp = y * b
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t, double a, double b) {
            	double tmp;
            	if (y <= -4800000.0) {
            		tmp = y * b;
            	} else if (y <= 1.6e+71) {
            		tmp = t * b;
            	} else {
            		tmp = y * b;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a, b):
            	tmp = 0
            	if y <= -4800000.0:
            		tmp = y * b
            	elif y <= 1.6e+71:
            		tmp = t * b
            	else:
            		tmp = y * b
            	return tmp
            
            function code(x, y, z, t, a, b)
            	tmp = 0.0
            	if (y <= -4800000.0)
            		tmp = Float64(y * b);
            	elseif (y <= 1.6e+71)
            		tmp = Float64(t * b);
            	else
            		tmp = Float64(y * b);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t, a, b)
            	tmp = 0.0;
            	if (y <= -4800000.0)
            		tmp = y * b;
            	elseif (y <= 1.6e+71)
            		tmp = t * b;
            	else
            		tmp = y * b;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -4800000], N[(y * b), $MachinePrecision], If[LessEqual[y, 160000000000000011605029821044677620185339905543443512882913624876646400], N[(t * b), $MachinePrecision], N[(y * b), $MachinePrecision]]]
            
            \begin{array}{l}
            \mathbf{if}\;y \leq -4800000:\\
            \;\;\;\;y \cdot b\\
            
            \mathbf{elif}\;y \leq 160000000000000011605029821044677620185339905543443512882913624876646400:\\
            \;\;\;\;t \cdot b\\
            
            \mathbf{else}:\\
            \;\;\;\;y \cdot b\\
            
            
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if y < -4.8e6 or 1.6000000000000001e71 < y

              1. Initial program 95.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. Taylor expanded in a around inf

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{y \cdot \left(b - z\right)} \]
              11. Taylor expanded in z around 0

                \[\leadsto y \cdot b \]
              12. Step-by-step derivation
                1. Applied rewrites17.6%

                  \[\leadsto y \cdot b \]

                if -4.8e6 < y < 1.6000000000000001e71

                1. Initial program 95.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. Taylor expanded in t around inf

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

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

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

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

                  \[\leadsto t \cdot b \]
                6. Step-by-step derivation
                  1. Applied rewrites18.0%

                    \[\leadsto t \cdot b \]
                7. Recombined 2 regimes into one program.
                8. Add Preprocessing

                Alternative 17: 18.0% accurate, 6.2× speedup?

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

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

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

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

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

                  \[\leadsto t \cdot b \]
                6. Step-by-step derivation
                  1. Applied rewrites18.0%

                    \[\leadsto t \cdot b \]
                  2. Add Preprocessing

                  Reproduce

                  ?
                  herbie shell --seed 2025271 -o generate:evaluate
                  (FPCore (x y z t a b)
                    :name "Statistics.Distribution.Beta:$centropy from math-functions-0.1.5.2"
                    :precision binary64
                    (+ (- (- x (* (- y 1) z)) (* (- t 1) a)) (* (- (+ y t) 2) b)))