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

Percentage Accurate: 95.2% → 97.5%
Time: 3.8s
Alternatives: 18
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.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
	return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b):
	return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b))
end
function tmp = code(x, y, z, t, a, b)
	tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\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 18 alternatives:

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

Initial Program: 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.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
	return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b):
	return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b))
end
function tmp = code(x, y, z, t, a, b)
	tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\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.5% accurate, 0.5× speedup?

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

\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 \left(\color{blue}{\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. sub-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\color{blue}{\left(\left(x - z \cdot y\right) - \left(-z\right)\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 y around inf

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

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

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

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

Alternative 2: 97.5% 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.0) z)) (* (- t 1.0) a))
         (* (- (+ y t) 2.0) 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.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, 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 y around inf

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

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

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

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

Alternative 3: 88.1% accurate, 0.9× speedup?

\[\begin{array}{l} t_1 := \left(x - a \cdot \left(t - 1\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{if}\;b \leq -5.8 \cdot 10^{+147}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 1.1 \cdot 10^{+62}:\\ \;\;\;\;\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + b \cdot y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a b)
  :precision binary64
  (let* ((t_1 (+ (- x (* a (- t 1.0))) (* (- (+ y t) 2.0) b))))
  (if (<= b -5.8e+147)
    t_1
    (if (<= b 1.1e+62)
      (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* b y))
      t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x - (a * (t - 1.0))) + (((y + t) - 2.0) * b);
	double tmp;
	if (b <= -5.8e+147) {
		tmp = t_1;
	} else if (b <= 1.1e+62) {
		tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (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 = (x - (a * (t - 1.0d0))) + (((y + t) - 2.0d0) * b)
    if (b <= (-5.8d+147)) then
        tmp = t_1
    else if (b <= 1.1d+62) then
        tmp = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (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 = (x - (a * (t - 1.0))) + (((y + t) - 2.0) * b);
	double tmp;
	if (b <= -5.8e+147) {
		tmp = t_1;
	} else if (b <= 1.1e+62) {
		tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (b * y);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x - (a * (t - 1.0))) + (((y + t) - 2.0) * b)
	tmp = 0
	if b <= -5.8e+147:
		tmp = t_1
	elif b <= 1.1e+62:
		tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (b * y)
	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(Float64(Float64(y + t) - 2.0) * b))
	tmp = 0.0
	if (b <= -5.8e+147)
		tmp = t_1;
	elseif (b <= 1.1e+62)
		tmp = Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(b * y));
	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))) + (((y + t) - 2.0) * b);
	tmp = 0.0;
	if (b <= -5.8e+147)
		tmp = t_1;
	elseif (b <= 1.1e+62)
		tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (b * y);
	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.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -5.8e+147], t$95$1, If[LessEqual[b, 1.1e+62], N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(b * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \left(x - a \cdot \left(t - 1\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{if}\;b \leq -5.8 \cdot 10^{+147}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -5.7999999999999997e147 or 1.1000000000000001e62 < 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 z around 0

      \[\leadsto \color{blue}{\left(x - a \cdot \left(t - 1\right)\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    3. 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--.f6473.3%

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

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

    if -5.7999999999999997e147 < b < 1.1000000000000001e62

    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-*.f6478.7%

        \[\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 rewrites78.7%

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

Alternative 4: 83.8% accurate, 1.0× speedup?

\[\begin{array}{l} \mathbf{if}\;z \leq -2.03 \cdot 10^{+186}:\\ \;\;\;\;\left(x + z\right) - y \cdot z\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{+118}:\\ \;\;\;\;\left(x - a \cdot \left(t - 1\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(x + \left(z + b \cdot \left(\left(t + y\right) - 2\right)\right)\right) - y \cdot z\\ \end{array} \]
(FPCore (x y z t a b)
  :precision binary64
  (if (<= z -2.03e+186)
  (- (+ x z) (* y z))
  (if (<= z 3.9e+118)
    (+ (- x (* a (- t 1.0))) (* (- (+ y t) 2.0) b))
    (- (+ x (+ z (* b (- (+ t y) 2.0)))) (* y z)))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= -2.03e+186) {
		tmp = (x + z) - (y * z);
	} else if (z <= 3.9e+118) {
		tmp = (x - (a * (t - 1.0))) + (((y + t) - 2.0) * b);
	} else {
		tmp = (x + (z + (b * ((t + y) - 2.0)))) - (y * 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) :: tmp
    if (z <= (-2.03d+186)) then
        tmp = (x + z) - (y * z)
    else if (z <= 3.9d+118) then
        tmp = (x - (a * (t - 1.0d0))) + (((y + t) - 2.0d0) * b)
    else
        tmp = (x + (z + (b * ((t + y) - 2.0d0)))) - (y * z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= -2.03e+186) {
		tmp = (x + z) - (y * z);
	} else if (z <= 3.9e+118) {
		tmp = (x - (a * (t - 1.0))) + (((y + t) - 2.0) * b);
	} else {
		tmp = (x + (z + (b * ((t + y) - 2.0)))) - (y * z);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if z <= -2.03e+186:
		tmp = (x + z) - (y * z)
	elif z <= 3.9e+118:
		tmp = (x - (a * (t - 1.0))) + (((y + t) - 2.0) * b)
	else:
		tmp = (x + (z + (b * ((t + y) - 2.0)))) - (y * z)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (z <= -2.03e+186)
		tmp = Float64(Float64(x + z) - Float64(y * z));
	elseif (z <= 3.9e+118)
		tmp = Float64(Float64(x - Float64(a * Float64(t - 1.0))) + Float64(Float64(Float64(y + t) - 2.0) * b));
	else
		tmp = Float64(Float64(x + Float64(z + Float64(b * Float64(Float64(t + y) - 2.0)))) - Float64(y * z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (z <= -2.03e+186)
		tmp = (x + z) - (y * z);
	elseif (z <= 3.9e+118)
		tmp = (x - (a * (t - 1.0))) + (((y + t) - 2.0) * b);
	else
		tmp = (x + (z + (b * ((t + y) - 2.0)))) - (y * z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.03e+186], N[(N[(x + z), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.9e+118], N[(N[(x - N[(a * N[(t - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z + N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;z \leq -2.03 \cdot 10^{+186}:\\
\;\;\;\;\left(x + z\right) - y \cdot z\\

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

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


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

    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 \left(\color{blue}{\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. sub-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x + \left(z + b \cdot \left(\left(t + y\right) - 2\right)\right)\right) - y \cdot z \]
      7. lower-*.f6473.4%

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

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

      \[\leadsto \left(x + z\right) - \color{blue}{y} \cdot z \]
    8. Step-by-step derivation
      1. lower-+.f6441.5%

        \[\leadsto \left(x + z\right) - y \cdot z \]
    9. Applied rewrites41.5%

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

    if -2.0300000000000001e186 < z < 3.9e118

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

      \[\leadsto \color{blue}{\left(x - a \cdot \left(t - 1\right)\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    3. 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--.f6473.3%

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

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

    if 3.9e118 < 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 \left(\color{blue}{\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. sub-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x + \left(z + b \cdot \left(\left(t + y\right) - 2\right)\right)\right) - y \cdot z \]
      7. lower-*.f6473.4%

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

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

Alternative 5: 83.2% accurate, 1.0× speedup?

\[\begin{array}{l} t_1 := a \cdot \left(1 - t\right) + \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{if}\;a \leq -1.15 \cdot 10^{+98}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{+71}:\\ \;\;\;\;\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 (+ (* a (- 1.0 t)) (* (- (+ y t) 2.0) b))))
  (if (<= a -1.15e+98)
    t_1
    (if (<= a 7.5e+71)
      (- (+ x (* b (- (+ t y) 2.0))) (* z (- y 1.0)))
      t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (a * (1.0 - t)) + (((y + t) - 2.0) * b);
	double tmp;
	if (a <= -1.15e+98) {
		tmp = t_1;
	} else if (a <= 7.5e+71) {
		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 = (a * (1.0d0 - t)) + (((y + t) - 2.0d0) * b)
    if (a <= (-1.15d+98)) then
        tmp = t_1
    else if (a <= 7.5d+71) 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 = (a * (1.0 - t)) + (((y + t) - 2.0) * b);
	double tmp;
	if (a <= -1.15e+98) {
		tmp = t_1;
	} else if (a <= 7.5e+71) {
		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 = (a * (1.0 - t)) + (((y + t) - 2.0) * b)
	tmp = 0
	if a <= -1.15e+98:
		tmp = t_1
	elif a <= 7.5e+71:
		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(a * Float64(1.0 - t)) + Float64(Float64(Float64(y + t) - 2.0) * b))
	tmp = 0.0
	if (a <= -1.15e+98)
		tmp = t_1;
	elseif (a <= 7.5e+71)
		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 = (a * (1.0 - t)) + (((y + t) - 2.0) * b);
	tmp = 0.0;
	if (a <= -1.15e+98)
		tmp = t_1;
	elseif (a <= 7.5e+71)
		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[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.15e+98], t$95$1, If[LessEqual[a, 7.5e+71], N[(N[(x + N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * N[(y - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right) + \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{if}\;a \leq -1.15 \cdot 10^{+98}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 7.5 \cdot 10^{+71}:\\
\;\;\;\;\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 < -1.1500000000000001e98 or 7.5000000000000001e71 < 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.7%

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

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

    if -1.1500000000000001e98 < a < 7.5000000000000001e71

    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.4%

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

      \[\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: 67.6% accurate, 1.0× speedup?

\[\begin{array}{l} \mathbf{if}\;x \leq -1.85 \cdot 10^{+61}:\\ \;\;\;\;\left(x + b \cdot \left(y - 2\right)\right) - z \cdot \left(y - 1\right)\\ \mathbf{elif}\;x \leq 1.85 \cdot 10^{+34}:\\ \;\;\;\;a \cdot \left(1 - t\right) + \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(\left(x - y \cdot z\right) - a \cdot t\right) + b \cdot y\\ \end{array} \]
(FPCore (x y z t a b)
  :precision binary64
  (if (<= x -1.85e+61)
  (- (+ x (* b (- y 2.0))) (* z (- y 1.0)))
  (if (<= x 1.85e+34)
    (+ (* a (- 1.0 t)) (* (- (+ y t) 2.0) b))
    (+ (- (- x (* y z)) (* a t)) (* b y)))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (x <= -1.85e+61) {
		tmp = (x + (b * (y - 2.0))) - (z * (y - 1.0));
	} else if (x <= 1.85e+34) {
		tmp = (a * (1.0 - t)) + (((y + t) - 2.0) * b);
	} else {
		tmp = ((x - (y * z)) - (a * t)) + (b * y);
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

\mathbf{elif}\;x \leq 1.85 \cdot 10^{+34}:\\
\;\;\;\;a \cdot \left(1 - t\right) + \left(\left(y + t\right) - 2\right) \cdot b\\

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


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.85e61

    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.4%

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

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

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

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

        \[\leadsto \left(x + b \cdot \left(y - 2\right)\right) - z \cdot \left(y - 1\right) \]
      3. lower--.f6460.4%

        \[\leadsto \left(x + b \cdot \left(y - 2\right)\right) - z \cdot \left(y - 1\right) \]
    7. Applied rewrites60.4%

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

    if -1.85e61 < x < 1.85e34

    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.7%

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

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

    if 1.85e34 < x

    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-*.f6478.7%

        \[\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 rewrites78.7%

      \[\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-*.f6469.5%

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

      \[\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-*.f6459.5%

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

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

Alternative 7: 67.0% accurate, 1.1× speedup?

\[\begin{array}{l} t_1 := \left(x + b \cdot \left(y - 2\right)\right) - z \cdot \left(y - 1\right)\\ \mathbf{if}\;x \leq -1.85 \cdot 10^{+61}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 7.2 \cdot 10^{+84}:\\ \;\;\;\;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 (* b (- y 2.0))) (* z (- y 1.0)))))
  (if (<= x -1.85e+61)
    t_1
    (if (<= x 7.2e+84)
      (+ (* a (- 1.0 t)) (* (- (+ y t) 2.0) b))
      t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + (b * (y - 2.0))) - (z * (y - 1.0));
	double tmp;
	if (x <= -1.85e+61) {
		tmp = t_1;
	} else if (x <= 7.2e+84) {
		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 + (b * (y - 2.0d0))) - (z * (y - 1.0d0))
    if (x <= (-1.85d+61)) then
        tmp = t_1
    else if (x <= 7.2d+84) 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 + (b * (y - 2.0))) - (z * (y - 1.0));
	double tmp;
	if (x <= -1.85e+61) {
		tmp = t_1;
	} else if (x <= 7.2e+84) {
		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 + (b * (y - 2.0))) - (z * (y - 1.0))
	tmp = 0
	if x <= -1.85e+61:
		tmp = t_1
	elif x <= 7.2e+84:
		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(x + Float64(b * Float64(y - 2.0))) - Float64(z * Float64(y - 1.0)))
	tmp = 0.0
	if (x <= -1.85e+61)
		tmp = t_1;
	elseif (x <= 7.2e+84)
		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 + (b * (y - 2.0))) - (z * (y - 1.0));
	tmp = 0.0;
	if (x <= -1.85e+61)
		tmp = t_1;
	elseif (x <= 7.2e+84)
		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[(x + N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * N[(y - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.85e+61], t$95$1, If[LessEqual[x, 7.2e+84], N[(N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \left(x + b \cdot \left(y - 2\right)\right) - z \cdot \left(y - 1\right)\\
\mathbf{if}\;x \leq -1.85 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 7.2 \cdot 10^{+84}:\\
\;\;\;\;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 2 regimes
  2. if x < -1.85e61 or 7.1999999999999999e84 < x

    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.4%

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

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

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

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

        \[\leadsto \left(x + b \cdot \left(y - 2\right)\right) - z \cdot \left(y - 1\right) \]
      3. lower--.f6460.4%

        \[\leadsto \left(x + b \cdot \left(y - 2\right)\right) - z \cdot \left(y - 1\right) \]
    7. Applied rewrites60.4%

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

    if -1.85e61 < x < 7.1999999999999999e84

    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.7%

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

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

Alternative 8: 65.8% accurate, 1.2× speedup?

\[\begin{array}{l} \mathbf{if}\;b \leq -7.8 \cdot 10^{+129}:\\ \;\;\;\;a + \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq 1.6 \cdot 10^{-45}:\\ \;\;\;\;\left(x - a \cdot \left(t - 1\right)\right) + b \cdot y\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(\left(t + y\right) - 2\right)\\ \end{array} \]
(FPCore (x y z t a b)
  :precision binary64
  (if (<= b -7.8e+129)
  (+ a (* (- (+ y t) 2.0) b))
  (if (<= b 1.6e-45)
    (+ (- x (* a (- t 1.0))) (* b y))
    (+ x (* b (- (+ t y) 2.0))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= -7.8e+129) {
		tmp = a + (((y + t) - 2.0) * b);
	} else if (b <= 1.6e-45) {
		tmp = (x - (a * (t - 1.0))) + (b * y);
	} else {
		tmp = x + (b * ((t + y) - 2.0));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

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

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


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

    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.7%

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

      \[\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 + \left(\left(y + t\right) - 2\right) \cdot b \]
    6. Step-by-step derivation
      1. Applied rewrites46.3%

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

      if -7.7999999999999994e129 < b < 1.6e-45

      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 \left(\color{blue}{\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. sub-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.6e-45 < 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 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.4%

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

        \[\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.7%

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

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

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

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

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

          \[\leadsto x + b \cdot \left(\left(t + y\right) - 2\right) \]
        4. lower-+.f6450.8%

          \[\leadsto x + b \cdot \left(\left(t + y\right) - 2\right) \]
      10. Applied rewrites50.8%

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

    Alternative 9: 65.6% accurate, 0.8× speedup?

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

      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.7%

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

        \[\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 + \left(\left(y + t\right) - 2\right) \cdot b \]
      6. Step-by-step derivation
        1. Applied rewrites46.3%

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

        if -9.0000000000000003e-27 < b < -2.6e-136 or 2.4999999999999998e-304 < b < 2.9999999999999999e-143

        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 \left(\color{blue}{\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. sub-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(x + \left(z + b \cdot \left(\left(t + y\right) - 2\right)\right)\right) - y \cdot z \]
          7. lower-*.f6473.4%

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

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

          \[\leadsto \left(x + z\right) - \color{blue}{y} \cdot z \]
        8. Step-by-step derivation
          1. lower-+.f6441.5%

            \[\leadsto \left(x + z\right) - y \cdot z \]
        9. Applied rewrites41.5%

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

        if -2.6e-136 < b < 2.4999999999999998e-304 or 2.9999999999999999e-143 < b < 9

        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.7%

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

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

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

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

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

        if 9 < 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 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.4%

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

          \[\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.7%

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

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

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

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

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

            \[\leadsto x + b \cdot \left(\left(t + y\right) - 2\right) \]
          4. lower-+.f6450.8%

            \[\leadsto x + b \cdot \left(\left(t + y\right) - 2\right) \]
        10. Applied rewrites50.8%

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

      Alternative 10: 59.0% accurate, 1.4× speedup?

      \[\begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -2.9 \cdot 10^{+41}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{-25}:\\ \;\;\;\;x - \left(\left(2 - t\right) \cdot b - z\right)\\ \mathbf{elif}\;y \leq 7.6 \cdot 10^{+51}:\\ \;\;\;\;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 -2.9e+41)
          t_1
          (if (<= y 5.5e-25)
            (- x (- (* (- 2.0 t) b) z))
            (if (<= y 7.6e+51) (* 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.9e+41) {
      		tmp = t_1;
      	} else if (y <= 5.5e-25) {
      		tmp = x - (((2.0 - t) * b) - z);
      	} else if (y <= 7.6e+51) {
      		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.9d+41)) then
              tmp = t_1
          else if (y <= 5.5d-25) then
              tmp = x - (((2.0d0 - t) * b) - z)
          else if (y <= 7.6d+51) 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.9e+41) {
      		tmp = t_1;
      	} else if (y <= 5.5e-25) {
      		tmp = x - (((2.0 - t) * b) - z);
      	} else if (y <= 7.6e+51) {
      		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.9e+41:
      		tmp = t_1
      	elif y <= 5.5e-25:
      		tmp = x - (((2.0 - t) * b) - z)
      	elif y <= 7.6e+51:
      		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.9e+41)
      		tmp = t_1;
      	elseif (y <= 5.5e-25)
      		tmp = Float64(x - Float64(Float64(Float64(2.0 - t) * b) - z));
      	elseif (y <= 7.6e+51)
      		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.9e+41)
      		tmp = t_1;
      	elseif (y <= 5.5e-25)
      		tmp = x - (((2.0 - t) * b) - z);
      	elseif (y <= 7.6e+51)
      		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, -2.9e+41], t$95$1, If[LessEqual[y, 5.5e-25], N[(x - N[(N[(N[(2.0 - t), $MachinePrecision] * b), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.6e+51], 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 -2.9 \cdot 10^{+41}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;y \leq 5.5 \cdot 10^{-25}:\\
      \;\;\;\;x - \left(\left(2 - t\right) \cdot b - z\right)\\
      
      \mathbf{elif}\;y \leq 7.6 \cdot 10^{+51}:\\
      \;\;\;\;t \cdot \left(b - a\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if y < -2.8999999999999999e41 or 7.5999999999999994e51 < 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 \color{blue}{y \cdot \left(b - z\right)} \]
        3. Step-by-step derivation
          1. lower-*.f64N/A

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

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

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

        if -2.8999999999999999e41 < y < 5.5e-25

        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.4%

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

          \[\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.7%

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

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

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

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

            \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - \left(\mathsf{neg}\left(z\right)\right) \]
          4. add-flip-revN/A

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

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

            \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) + z \]
          7. fp-cancel-sign-sub-invN/A

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

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

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

            \[\leadsto x - \left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(t - 2\right) - z\right) \]
          11. *-commutativeN/A

            \[\leadsto x - \left(\left(t - 2\right) \cdot \left(\mathsf{neg}\left(b\right)\right) - z\right) \]
          12. distribute-rgt-neg-inN/A

            \[\leadsto x - \left(\left(\mathsf{neg}\left(\left(t - 2\right) \cdot b\right)\right) - z\right) \]
          13. distribute-lft-neg-inN/A

            \[\leadsto x - \left(\left(\mathsf{neg}\left(\left(t - 2\right)\right)\right) \cdot b - z\right) \]
          14. lift--.f64N/A

            \[\leadsto x - \left(\left(\mathsf{neg}\left(\left(t - 2\right)\right)\right) \cdot b - z\right) \]
          15. sub-negate-revN/A

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

            \[\leadsto x - \left(\left(2 - t\right) \cdot b - z\right) \]
          17. lower--.f6446.7%

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

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

        if 5.5e-25 < y < 7.5999999999999994e51

        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--.f6433.1%

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

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

      Alternative 11: 57.2% accurate, 1.5× speedup?

      \[\begin{array}{l} t_1 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -35000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+25}:\\ \;\;\;\;a + \left(y - 2\right) \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 -35000000000.0)
          t_1
          (if (<= t 3e+25) (+ a (* (- y 2.0) 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 <= -35000000000.0) {
      		tmp = t_1;
      	} else if (t <= 3e+25) {
      		tmp = a + ((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 = t * (b - a)
          if (t <= (-35000000000.0d0)) then
              tmp = t_1
          else if (t <= 3d+25) then
              tmp = a + ((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 = t * (b - a);
      	double tmp;
      	if (t <= -35000000000.0) {
      		tmp = t_1;
      	} else if (t <= 3e+25) {
      		tmp = a + ((y - 2.0) * b);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = t * (b - a)
      	tmp = 0
      	if t <= -35000000000.0:
      		tmp = t_1
      	elif t <= 3e+25:
      		tmp = a + ((y - 2.0) * 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 <= -35000000000.0)
      		tmp = t_1;
      	elseif (t <= 3e+25)
      		tmp = Float64(a + 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 = t * (b - a);
      	tmp = 0.0;
      	if (t <= -35000000000.0)
      		tmp = t_1;
      	elseif (t <= 3e+25)
      		tmp = a + ((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[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -35000000000.0], t$95$1, If[LessEqual[t, 3e+25], N[(a + N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      t_1 := t \cdot \left(b - a\right)\\
      \mathbf{if}\;t \leq -35000000000:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t \leq 3 \cdot 10^{+25}:\\
      \;\;\;\;a + \left(y - 2\right) \cdot b\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if t < -3.5e10 or 3.0000000000000001e25 < 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--.f6433.1%

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

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

        if -3.5e10 < t < 3.0000000000000001e25

        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.7%

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

          \[\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 + \left(\left(y + t\right) - 2\right) \cdot b \]
        6. Step-by-step derivation
          1. Applied rewrites46.3%

            \[\leadsto a + \left(\left(y + t\right) - 2\right) \cdot b \]
          2. Taylor expanded in t around 0

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

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

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

        Alternative 12: 54.7% accurate, 1.4× speedup?

        \[\begin{array}{l} t_1 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -35000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-218}:\\ \;\;\;\;x + b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+25}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
        (FPCore (x y z t a b)
          :precision binary64
          (let* ((t_1 (* t (- b a))))
          (if (<= t -35000000000.0)
            t_1
            (if (<= t 2.9e-218)
              (+ x (* b (- y 2.0)))
              (if (<= t 3e+25) (* y (- b z)) 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 <= -35000000000.0) {
        		tmp = t_1;
        	} else if (t <= 2.9e-218) {
        		tmp = x + (b * (y - 2.0));
        	} else if (t <= 3e+25) {
        		tmp = y * (b - z);
        	} 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 <= (-35000000000.0d0)) then
                tmp = t_1
            else if (t <= 2.9d-218) then
                tmp = x + (b * (y - 2.0d0))
            else if (t <= 3d+25) then
                tmp = y * (b - z)
            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 <= -35000000000.0) {
        		tmp = t_1;
        	} else if (t <= 2.9e-218) {
        		tmp = x + (b * (y - 2.0));
        	} else if (t <= 3e+25) {
        		tmp = y * (b - z);
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t, a, b):
        	t_1 = t * (b - a)
        	tmp = 0
        	if t <= -35000000000.0:
        		tmp = t_1
        	elif t <= 2.9e-218:
        		tmp = x + (b * (y - 2.0))
        	elif t <= 3e+25:
        		tmp = y * (b - z)
        	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 <= -35000000000.0)
        		tmp = t_1;
        	elseif (t <= 2.9e-218)
        		tmp = Float64(x + Float64(b * Float64(y - 2.0)));
        	elseif (t <= 3e+25)
        		tmp = Float64(y * Float64(b - z));
        	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 <= -35000000000.0)
        		tmp = t_1;
        	elseif (t <= 2.9e-218)
        		tmp = x + (b * (y - 2.0));
        	elseif (t <= 3e+25)
        		tmp = y * (b - z);
        	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, -35000000000.0], t$95$1, If[LessEqual[t, 2.9e-218], N[(x + N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e+25], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
        
        \begin{array}{l}
        t_1 := t \cdot \left(b - a\right)\\
        \mathbf{if}\;t \leq -35000000000:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t \leq 2.9 \cdot 10^{-218}:\\
        \;\;\;\;x + b \cdot \left(y - 2\right)\\
        
        \mathbf{elif}\;t \leq 3 \cdot 10^{+25}:\\
        \;\;\;\;y \cdot \left(b - z\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if t < -3.5e10 or 3.0000000000000001e25 < 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--.f6433.1%

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

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

          if -3.5e10 < t < 2.9000000000000002e-218

          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.4%

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

            \[\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.7%

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

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

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

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

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

              \[\leadsto x + b \cdot \left(\left(t + y\right) - 2\right) \]
            4. lower-+.f6450.8%

              \[\leadsto x + b \cdot \left(\left(t + y\right) - 2\right) \]
          10. Applied rewrites50.8%

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

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

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

              \[\leadsto x + b \cdot \left(y - 2\right) \]
            3. lower--.f6437.5%

              \[\leadsto x + b \cdot \left(y - 2\right) \]
          13. Applied rewrites37.5%

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

          if 2.9000000000000002e-218 < t < 3.0000000000000001e25

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

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

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

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

        Alternative 13: 51.4% accurate, 1.4× speedup?

        \[\begin{array}{l} t_1 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -35000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-216}:\\ \;\;\;\;a + b \cdot y\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+25}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
        (FPCore (x y z t a b)
          :precision binary64
          (let* ((t_1 (* t (- b a))))
          (if (<= t -35000000000.0)
            t_1
            (if (<= t 8.5e-216)
              (+ a (* b y))
              (if (<= t 3e+25) (* y (- b z)) 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 <= -35000000000.0) {
        		tmp = t_1;
        	} else if (t <= 8.5e-216) {
        		tmp = a + (b * y);
        	} else if (t <= 3e+25) {
        		tmp = y * (b - z);
        	} 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 <= (-35000000000.0d0)) then
                tmp = t_1
            else if (t <= 8.5d-216) then
                tmp = a + (b * y)
            else if (t <= 3d+25) then
                tmp = y * (b - z)
            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 <= -35000000000.0) {
        		tmp = t_1;
        	} else if (t <= 8.5e-216) {
        		tmp = a + (b * y);
        	} else if (t <= 3e+25) {
        		tmp = y * (b - z);
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t, a, b):
        	t_1 = t * (b - a)
        	tmp = 0
        	if t <= -35000000000.0:
        		tmp = t_1
        	elif t <= 8.5e-216:
        		tmp = a + (b * y)
        	elif t <= 3e+25:
        		tmp = y * (b - z)
        	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 <= -35000000000.0)
        		tmp = t_1;
        	elseif (t <= 8.5e-216)
        		tmp = Float64(a + Float64(b * y));
        	elseif (t <= 3e+25)
        		tmp = Float64(y * Float64(b - z));
        	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 <= -35000000000.0)
        		tmp = t_1;
        	elseif (t <= 8.5e-216)
        		tmp = a + (b * y);
        	elseif (t <= 3e+25)
        		tmp = y * (b - z);
        	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, -35000000000.0], t$95$1, If[LessEqual[t, 8.5e-216], N[(a + N[(b * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e+25], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
        
        \begin{array}{l}
        t_1 := t \cdot \left(b - a\right)\\
        \mathbf{if}\;t \leq -35000000000:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t \leq 8.5 \cdot 10^{-216}:\\
        \;\;\;\;a + b \cdot y\\
        
        \mathbf{elif}\;t \leq 3 \cdot 10^{+25}:\\
        \;\;\;\;y \cdot \left(b - z\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if t < -3.5e10 or 3.0000000000000001e25 < 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--.f6433.1%

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

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

          if -3.5e10 < t < 8.5e-216

          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.7%

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

            \[\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 + \left(\left(y + t\right) - 2\right) \cdot b \]
          6. Step-by-step derivation
            1. Applied rewrites46.3%

              \[\leadsto a + \left(\left(y + t\right) - 2\right) \cdot b \]
            2. Taylor expanded in y around inf

              \[\leadsto a + \color{blue}{b \cdot y} \]
            3. Step-by-step derivation
              1. lower-*.f6427.2%

                \[\leadsto a + b \cdot \color{blue}{y} \]
            4. Applied rewrites27.2%

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

            if 8.5e-216 < t < 3.0000000000000001e25

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

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

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

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

          Alternative 14: 48.1% accurate, 1.8× speedup?

          \[\begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -1.72 \cdot 10^{-77}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 7.6 \cdot 10^{+51}:\\ \;\;\;\;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 -1.72e-77) t_1 (if (<= y 7.6e+51) (* 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 <= -1.72e-77) {
          		tmp = t_1;
          	} else if (y <= 7.6e+51) {
          		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 <= (-1.72d-77)) then
                  tmp = t_1
              else if (y <= 7.6d+51) 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 <= -1.72e-77) {
          		tmp = t_1;
          	} else if (y <= 7.6e+51) {
          		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 <= -1.72e-77:
          		tmp = t_1
          	elif y <= 7.6e+51:
          		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 <= -1.72e-77)
          		tmp = t_1;
          	elseif (y <= 7.6e+51)
          		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 <= -1.72e-77)
          		tmp = t_1;
          	elseif (y <= 7.6e+51)
          		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, -1.72e-77], t$95$1, If[LessEqual[y, 7.6e+51], 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 -1.72 \cdot 10^{-77}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;y \leq 7.6 \cdot 10^{+51}:\\
          \;\;\;\;t \cdot \left(b - a\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if y < -1.72e-77 or 7.5999999999999994e51 < 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 \color{blue}{y \cdot \left(b - z\right)} \]
            3. Step-by-step derivation
              1. lower-*.f64N/A

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

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

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

            if -1.72e-77 < y < 7.5999999999999994e51

            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--.f6433.1%

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

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

          Alternative 15: 48.1% accurate, 1.8× speedup?

          \[\begin{array}{l} t_1 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -6.2 \cdot 10^{+23}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{+24}:\\ \;\;\;\;z + x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
          (FPCore (x y z t a b)
            :precision binary64
            (let* ((t_1 (* t (- b a))))
            (if (<= t -6.2e+23) t_1 (if (<= t 9.5e+24) (+ z x) 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 <= -6.2e+23) {
          		tmp = t_1;
          	} else if (t <= 9.5e+24) {
          		tmp = z + x;
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          module fmin_fmax_functions
              implicit none
              private
              public fmax
              public fmin
          
              interface fmax
                  module procedure fmax88
                  module procedure fmax44
                  module procedure fmax84
                  module procedure fmax48
              end interface
              interface fmin
                  module procedure fmin88
                  module procedure fmin44
                  module procedure fmin84
                  module procedure fmin48
              end interface
          contains
              real(8) function fmax88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(4) function fmax44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(8) function fmax84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmax48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
              end function
              real(8) function fmin88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(4) function fmin44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(8) function fmin84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmin48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
              end function
          end module
          
          real(8) function code(x, y, z, t, a, b)
          use fmin_fmax_functions
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              real(8), intent (in) :: a
              real(8), intent (in) :: b
              real(8) :: t_1
              real(8) :: tmp
              t_1 = t * (b - a)
              if (t <= (-6.2d+23)) then
                  tmp = t_1
              else if (t <= 9.5d+24) then
                  tmp = z + x
              else
                  tmp = t_1
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t, double a, double b) {
          	double t_1 = t * (b - a);
          	double tmp;
          	if (t <= -6.2e+23) {
          		tmp = t_1;
          	} else if (t <= 9.5e+24) {
          		tmp = z + x;
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a, b):
          	t_1 = t * (b - a)
          	tmp = 0
          	if t <= -6.2e+23:
          		tmp = t_1
          	elif t <= 9.5e+24:
          		tmp = z + x
          	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 <= -6.2e+23)
          		tmp = t_1;
          	elseif (t <= 9.5e+24)
          		tmp = Float64(z + x);
          	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 <= -6.2e+23)
          		tmp = t_1;
          	elseif (t <= 9.5e+24)
          		tmp = z + x;
          	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, -6.2e+23], t$95$1, If[LessEqual[t, 9.5e+24], N[(z + x), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          t_1 := t \cdot \left(b - a\right)\\
          \mathbf{if}\;t \leq -6.2 \cdot 10^{+23}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;t \leq 9.5 \cdot 10^{+24}:\\
          \;\;\;\;z + x\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if t < -6.1999999999999994e23 or 9.5000000000000001e24 < 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--.f6433.1%

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

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

            if -6.1999999999999994e23 < t < 9.5000000000000001e24

            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.4%

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

              \[\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.7%

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

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

              \[\leadsto x - -1 \cdot \color{blue}{z} \]
            9. Step-by-step derivation
              1. lower--.f64N/A

                \[\leadsto x - -1 \cdot z \]
              2. lower-*.f6425.4%

                \[\leadsto x - -1 \cdot z \]
            10. Applied rewrites25.4%

              \[\leadsto x - -1 \cdot \color{blue}{z} \]
            11. Step-by-step derivation
              1. lift--.f64N/A

                \[\leadsto x - -1 \cdot z \]
              2. sub-flipN/A

                \[\leadsto x + \left(\mathsf{neg}\left(-1 \cdot z\right)\right) \]
              3. +-commutativeN/A

                \[\leadsto \left(\mathsf{neg}\left(-1 \cdot z\right)\right) + x \]
              4. lower-+.f64N/A

                \[\leadsto \left(\mathsf{neg}\left(-1 \cdot z\right)\right) + x \]
              5. lift-*.f64N/A

                \[\leadsto \left(\mathsf{neg}\left(-1 \cdot z\right)\right) + x \]
              6. distribute-lft-neg-outN/A

                \[\leadsto \left(\mathsf{neg}\left(-1\right)\right) \cdot z + x \]
              7. metadata-evalN/A

                \[\leadsto 1 \cdot z + x \]
              8. *-lft-identity25.4%

                \[\leadsto z + x \]
            12. Applied rewrites25.4%

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

          Alternative 16: 33.0% accurate, 2.1× speedup?

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

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

              \[\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 rewrites17.3%

                \[\leadsto t \cdot b \]

              if -8.4999999999999996e24 < t < 3.0000000000000001e25

              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.4%

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

                \[\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.7%

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

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

                \[\leadsto x - -1 \cdot \color{blue}{z} \]
              9. Step-by-step derivation
                1. lower--.f64N/A

                  \[\leadsto x - -1 \cdot z \]
                2. lower-*.f6425.4%

                  \[\leadsto x - -1 \cdot z \]
              10. Applied rewrites25.4%

                \[\leadsto x - -1 \cdot \color{blue}{z} \]
              11. Step-by-step derivation
                1. lift--.f64N/A

                  \[\leadsto x - -1 \cdot z \]
                2. sub-flipN/A

                  \[\leadsto x + \left(\mathsf{neg}\left(-1 \cdot z\right)\right) \]
                3. +-commutativeN/A

                  \[\leadsto \left(\mathsf{neg}\left(-1 \cdot z\right)\right) + x \]
                4. lower-+.f64N/A

                  \[\leadsto \left(\mathsf{neg}\left(-1 \cdot z\right)\right) + x \]
                5. lift-*.f64N/A

                  \[\leadsto \left(\mathsf{neg}\left(-1 \cdot z\right)\right) + x \]
                6. distribute-lft-neg-outN/A

                  \[\leadsto \left(\mathsf{neg}\left(-1\right)\right) \cdot z + x \]
                7. metadata-evalN/A

                  \[\leadsto 1 \cdot z + x \]
                8. *-lft-identity25.4%

                  \[\leadsto z + x \]
              12. Applied rewrites25.4%

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

            Alternative 17: 25.4% accurate, 9.3× speedup?

            \[z + x \]
            (FPCore (x y z t a b)
              :precision binary64
              (+ z x))
            double code(double x, double y, double z, double t, double a, double b) {
            	return z + x;
            }
            
            module fmin_fmax_functions
                implicit none
                private
                public fmax
                public fmin
            
                interface fmax
                    module procedure fmax88
                    module procedure fmax44
                    module procedure fmax84
                    module procedure fmax48
                end interface
                interface fmin
                    module procedure fmin88
                    module procedure fmin44
                    module procedure fmin84
                    module procedure fmin48
                end interface
            contains
                real(8) function fmax88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(4) function fmax44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(8) function fmax84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmax48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                end function
                real(8) function fmin88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(4) function fmin44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(8) function fmin84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmin48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                end function
            end module
            
            real(8) function code(x, y, z, t, a, b)
            use fmin_fmax_functions
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8), intent (in) :: a
                real(8), intent (in) :: b
                code = z + x
            end function
            
            public static double code(double x, double y, double z, double t, double a, double b) {
            	return z + x;
            }
            
            def code(x, y, z, t, a, b):
            	return z + x
            
            function code(x, y, z, t, a, b)
            	return Float64(z + x)
            end
            
            function tmp = code(x, y, z, t, a, b)
            	tmp = z + x;
            end
            
            code[x_, y_, z_, t_, a_, b_] := N[(z + x), $MachinePrecision]
            
            z + x
            
            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 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.4%

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

              \[\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.7%

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

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

              \[\leadsto x - -1 \cdot \color{blue}{z} \]
            9. Step-by-step derivation
              1. lower--.f64N/A

                \[\leadsto x - -1 \cdot z \]
              2. lower-*.f6425.4%

                \[\leadsto x - -1 \cdot z \]
            10. Applied rewrites25.4%

              \[\leadsto x - -1 \cdot \color{blue}{z} \]
            11. Step-by-step derivation
              1. lift--.f64N/A

                \[\leadsto x - -1 \cdot z \]
              2. sub-flipN/A

                \[\leadsto x + \left(\mathsf{neg}\left(-1 \cdot z\right)\right) \]
              3. +-commutativeN/A

                \[\leadsto \left(\mathsf{neg}\left(-1 \cdot z\right)\right) + x \]
              4. lower-+.f64N/A

                \[\leadsto \left(\mathsf{neg}\left(-1 \cdot z\right)\right) + x \]
              5. lift-*.f64N/A

                \[\leadsto \left(\mathsf{neg}\left(-1 \cdot z\right)\right) + x \]
              6. distribute-lft-neg-outN/A

                \[\leadsto \left(\mathsf{neg}\left(-1\right)\right) \cdot z + x \]
              7. metadata-evalN/A

                \[\leadsto 1 \cdot z + x \]
              8. *-lft-identity25.4%

                \[\leadsto z + x \]
            12. Applied rewrites25.4%

              \[\leadsto z + x \]
            13. Add Preprocessing

            Alternative 18: 12.1% accurate, 37.0× speedup?

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

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

              \[\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.7%

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

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

              \[\leadsto x - -1 \cdot \color{blue}{z} \]
            9. Step-by-step derivation
              1. lower--.f64N/A

                \[\leadsto x - -1 \cdot z \]
              2. lower-*.f6425.4%

                \[\leadsto x - -1 \cdot z \]
            10. Applied rewrites25.4%

              \[\leadsto x - -1 \cdot \color{blue}{z} \]
            11. Taylor expanded in x around 0

              \[\leadsto z \]
            12. Step-by-step derivation
              1. Applied rewrites12.1%

                \[\leadsto z \]
              2. Add Preprocessing

              Reproduce

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