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

Percentage Accurate: 95.3% → 96.3%
Time: 5.9s
Alternatives: 26
Speedup: 1.0×

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 26 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.3% 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: 96.3% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 89.1% accurate, 0.9× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.32e42

    1. Initial program 95.3%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. 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.1%

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

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

    if -1.32e42 < t < 2.59999999999999997e-14

    1. Initial program 95.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a + \left(x + \mathsf{fma}\left(b, y - 2, z \cdot \left(1 - y\right)\right)\right) \]
      6. lower--.f6470.6%

        \[\leadsto a + \left(x + \mathsf{fma}\left(b, y - 2, z \cdot \left(1 - y\right)\right)\right) \]
    6. Applied rewrites70.6%

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

    if 2.59999999999999997e-14 < t

    1. Initial program 95.3%

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

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

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

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

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

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

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

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

        \[\leadsto b \cdot \left(\left(t + y\right) - 2\right) - \mathsf{fma}\left(a, t - 1, z \cdot \left(y - 1\right)\right) \]
      8. lower--.f6481.3%

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

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

Alternative 3: 86.3% accurate, 1.0× speedup?

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

\mathbf{elif}\;b \leq 1.65 \cdot 10^{-33}:\\
\;\;\;\;x - \mathsf{fma}\left(a, t - 1, t\_1\right)\\

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


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

    1. Initial program 95.3%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. 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.1%

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

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

    if -2.50000000000000002e40 < b < 1.6500000000000001e-33

    1. Initial program 95.3%

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

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

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

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

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

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

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

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

        \[\leadsto b \cdot \left(\left(t + y\right) - 2\right) - \mathsf{fma}\left(a, t - 1, z \cdot \left(y - 1\right)\right) \]
      8. lower--.f6481.3%

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

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

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

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

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

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

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

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

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

    if 1.6500000000000001e-33 < b

    1. Initial program 95.3%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. 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.1%

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

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

Alternative 4: 86.2% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;b \leq 1.65 \cdot 10^{-33}:\\
\;\;\;\;x - \mathsf{fma}\left(a, t - 1, z \cdot \left(y - 1\right)\right)\\

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


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -1.15e145

    1. Initial program 95.3%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. 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.1%

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

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

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

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

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

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

    if -1.15e145 < b < -5.5000000000000006e33

    1. Initial program 95.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a + \left(x + \mathsf{fma}\left(b, y - 2, z \cdot \left(1 - y\right)\right)\right) \]
      6. lower--.f6470.6%

        \[\leadsto a + \left(x + \mathsf{fma}\left(b, y - 2, z \cdot \left(1 - y\right)\right)\right) \]
    6. Applied rewrites70.6%

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

    if -5.5000000000000006e33 < b < 1.6500000000000001e-33

    1. Initial program 95.3%

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

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

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

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

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

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

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

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

        \[\leadsto b \cdot \left(\left(t + y\right) - 2\right) - \mathsf{fma}\left(a, t - 1, z \cdot \left(y - 1\right)\right) \]
      8. lower--.f6481.3%

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

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

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

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

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

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

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

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

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

    if 1.6500000000000001e-33 < b

    1. Initial program 95.3%

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

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

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

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

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

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

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

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

        \[\leadsto b \cdot \left(\left(t + y\right) - 2\right) - \mathsf{fma}\left(a, t - 1, z \cdot \left(y - 1\right)\right) \]
      8. lower--.f6481.3%

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

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

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

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

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

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

Alternative 5: 83.1% accurate, 1.0× speedup?

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

\mathbf{elif}\;b \leq 2.75 \cdot 10^{-8}:\\
\;\;\;\;x - \mathsf{fma}\left(a, t - 1, t\_1\right)\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.50000000000000002e40 or 2.7500000000000001e-8 < b

    1. Initial program 95.3%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. 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.1%

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

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

    if -2.50000000000000002e40 < b < 2.7500000000000001e-8

    1. Initial program 95.3%

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

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

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

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

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

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

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

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

        \[\leadsto b \cdot \left(\left(t + y\right) - 2\right) - \mathsf{fma}\left(a, t - 1, z \cdot \left(y - 1\right)\right) \]
      8. lower--.f6481.3%

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

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

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

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

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

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

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

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

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

Alternative 6: 82.7% accurate, 1.1× speedup?

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

\mathbf{elif}\;b \leq 1.65 \cdot 10^{-33}:\\
\;\;\;\;x - \mathsf{fma}\left(a, t - 1, z \cdot \left(y - 1\right)\right)\\

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


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

    1. Initial program 95.3%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. 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.1%

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

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

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

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

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

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

    if -2.25e70 < b < 1.6500000000000001e-33

    1. Initial program 95.3%

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

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

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

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

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

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

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

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

        \[\leadsto b \cdot \left(\left(t + y\right) - 2\right) - \mathsf{fma}\left(a, t - 1, z \cdot \left(y - 1\right)\right) \]
      8. lower--.f6481.3%

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

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

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

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

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

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

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

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

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

    if 1.6500000000000001e-33 < b

    1. Initial program 95.3%

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

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

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

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

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

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

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

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

        \[\leadsto b \cdot \left(\left(t + y\right) - 2\right) - \mathsf{fma}\left(a, t - 1, z \cdot \left(y - 1\right)\right) \]
      8. lower--.f6481.3%

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

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

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

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

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

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

Alternative 7: 82.5% accurate, 1.2× speedup?

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

\mathbf{elif}\;b \leq 1.7 \cdot 10^{-5}:\\
\;\;\;\;x - \mathsf{fma}\left(a, t - 1, z \cdot \left(y - 1\right)\right)\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.25e70 or 1.7e-5 < b

    1. Initial program 95.3%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. 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.1%

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

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

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

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

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

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

    if -2.25e70 < b < 1.7e-5

    1. Initial program 95.3%

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

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

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

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

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

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

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

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

        \[\leadsto b \cdot \left(\left(t + y\right) - 2\right) - \mathsf{fma}\left(a, t - 1, z \cdot \left(y - 1\right)\right) \]
      8. lower--.f6481.3%

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

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

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

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

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

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

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

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

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

Alternative 8: 70.3% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 95.3%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. 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.1%

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

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

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

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

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

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

    if -2.30000000000000011e33 < b < 3.9e-10

    1. Initial program 95.3%

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

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

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

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

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

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

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

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

        \[\leadsto b \cdot \left(\left(t + y\right) - 2\right) - \mathsf{fma}\left(a, t - 1, z \cdot \left(y - 1\right)\right) \]
      8. lower--.f6481.3%

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

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

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

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

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

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

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

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

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

      \[\leadsto x - \mathsf{fma}\left(a, t - 1, z \cdot -1\right) \]
    9. Step-by-step derivation
      1. Applied rewrites51.5%

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

      if 3.9e-10 < b

      1. Initial program 95.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\color{blue}{t - \left(2 - y\right)}, b, -1 \cdot \left(a \cdot t\right)\right) \]
        10. lift--.f64N/A

          \[\leadsto \mathsf{fma}\left(t - \color{blue}{\left(2 - y\right)}, b, -1 \cdot \left(a \cdot t\right)\right) \]
        11. lift--.f6450.9%

          \[\leadsto \mathsf{fma}\left(\color{blue}{t - \left(2 - y\right)}, b, -1 \cdot \left(a \cdot t\right)\right) \]
        12. lift-*.f64N/A

          \[\leadsto \mathsf{fma}\left(t - \left(2 - y\right), b, -1 \cdot \color{blue}{\left(a \cdot t\right)}\right) \]
        13. mul-1-negN/A

          \[\leadsto \mathsf{fma}\left(t - \left(2 - y\right), b, \mathsf{neg}\left(a \cdot t\right)\right) \]
        14. lift-*.f64N/A

          \[\leadsto \mathsf{fma}\left(t - \left(2 - y\right), b, \mathsf{neg}\left(a \cdot t\right)\right) \]
        15. distribute-lft-neg-outN/A

          \[\leadsto \mathsf{fma}\left(t - \left(2 - y\right), b, \left(\mathsf{neg}\left(a\right)\right) \cdot \color{blue}{t}\right) \]
        16. lift-neg.f64N/A

          \[\leadsto \mathsf{fma}\left(t - \left(2 - y\right), b, \left(-a\right) \cdot t\right) \]
        17. lower-*.f6450.9%

          \[\leadsto \mathsf{fma}\left(t - \left(2 - y\right), b, \left(-a\right) \cdot \color{blue}{t}\right) \]
      6. Applied rewrites50.9%

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

    Alternative 9: 70.0% accurate, 1.3× speedup?

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

      1. Initial program 95.3%

        \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      2. 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.1%

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

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

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

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

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

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

      if -2.30000000000000011e33 < b < 2.7500000000000001e-8

      1. Initial program 95.3%

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

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

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

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

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

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

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

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

          \[\leadsto b \cdot \left(\left(t + y\right) - 2\right) - \mathsf{fma}\left(a, t - 1, z \cdot \left(y - 1\right)\right) \]
        8. lower--.f6481.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \mathsf{fma}\left(a, t - 1, z \cdot -1\right) \]
      9. Step-by-step derivation
        1. Applied rewrites51.5%

          \[\leadsto x - \mathsf{fma}\left(a, t - 1, z \cdot -1\right) \]
      10. Recombined 2 regimes into one program.
      11. Add Preprocessing

      Alternative 10: 64.1% accurate, 1.3× speedup?

      \[\begin{array}{l} \mathbf{if}\;y \leq -1.85 \cdot 10^{+15}:\\ \;\;\;\;y \cdot \left(\left(1 - \frac{z}{b}\right) \cdot b\right)\\ \mathbf{elif}\;y \leq -3.4 \cdot 10^{-65}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 3.9 \cdot 10^{+45}:\\ \;\;\;\;\mathsf{fma}\left(t - 2, b, x + z\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (if (<= y -1.85e+15)
         (* y (* (- 1.0 (/ z b)) b))
         (if (<= y -3.4e-65)
           (* a (- 1.0 t))
           (if (<= y 3.9e+45) (fma (- t 2.0) b (+ x z)) (* y (- b z))))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double tmp;
      	if (y <= -1.85e+15) {
      		tmp = y * ((1.0 - (z / b)) * b);
      	} else if (y <= -3.4e-65) {
      		tmp = a * (1.0 - t);
      	} else if (y <= 3.9e+45) {
      		tmp = fma((t - 2.0), b, (x + z));
      	} else {
      		tmp = y * (b - z);
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b)
      	tmp = 0.0
      	if (y <= -1.85e+15)
      		tmp = Float64(y * Float64(Float64(1.0 - Float64(z / b)) * b));
      	elseif (y <= -3.4e-65)
      		tmp = Float64(a * Float64(1.0 - t));
      	elseif (y <= 3.9e+45)
      		tmp = fma(Float64(t - 2.0), b, Float64(x + z));
      	else
      		tmp = Float64(y * Float64(b - z));
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.85e+15], N[(y * N[(N[(1.0 - N[(z / b), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.4e-65], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.9e+45], N[(N[(t - 2.0), $MachinePrecision] * b + N[(x + z), $MachinePrecision]), $MachinePrecision], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]]]]
      
      \begin{array}{l}
      \mathbf{if}\;y \leq -1.85 \cdot 10^{+15}:\\
      \;\;\;\;y \cdot \left(\left(1 - \frac{z}{b}\right) \cdot b\right)\\
      
      \mathbf{elif}\;y \leq -3.4 \cdot 10^{-65}:\\
      \;\;\;\;a \cdot \left(1 - t\right)\\
      
      \mathbf{elif}\;y \leq 3.9 \cdot 10^{+45}:\\
      \;\;\;\;\mathsf{fma}\left(t - 2, b, x + z\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;y \cdot \left(b - z\right)\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if y < -1.85e15

        1. Initial program 95.3%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. 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--.f6433.5%

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

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

            \[\leadsto y \cdot \left(b - \color{blue}{z}\right) \]
          2. sub-to-multN/A

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

            \[\leadsto y \cdot \left(\left(1 - \frac{z}{b}\right) \cdot \color{blue}{b}\right) \]
          4. lower-unsound--.f64N/A

            \[\leadsto y \cdot \left(\left(1 - \frac{z}{b}\right) \cdot b\right) \]
          5. lower-unsound-/.f6432.7%

            \[\leadsto y \cdot \left(\left(1 - \frac{z}{b}\right) \cdot b\right) \]
        6. Applied rewrites32.7%

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

        if -1.85e15 < y < -3.39999999999999987e-65

        1. Initial program 95.3%

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

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

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

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

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

        if -3.39999999999999987e-65 < y < 3.8999999999999999e45

        1. Initial program 95.3%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. 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.1%

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

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

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

          \[\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. sub-flipN/A

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(t - 2, b, x + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)\right) \]
          11. distribute-lft-neg-outN/A

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

            \[\leadsto \mathsf{fma}\left(t - 2, b, x + 1 \cdot z\right) \]
          13. *-lft-identity45.8%

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

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

        if 3.8999999999999999e45 < y

        1. Initial program 95.3%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. 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--.f6433.5%

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

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

      Alternative 11: 63.9% accurate, 1.3× speedup?

      \[\begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -1.85 \cdot 10^{+15}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -3.4 \cdot 10^{-65}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 3.9 \cdot 10^{+45}:\\ \;\;\;\;\mathsf{fma}\left(t - 2, b, x + z\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.85e+15)
           t_1
           (if (<= y -3.4e-65)
             (* a (- 1.0 t))
             (if (<= y 3.9e+45) (fma (- t 2.0) b (+ x z)) 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.85e+15) {
      		tmp = t_1;
      	} else if (y <= -3.4e-65) {
      		tmp = a * (1.0 - t);
      	} else if (y <= 3.9e+45) {
      		tmp = fma((t - 2.0), b, (x + z));
      	} 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.85e+15)
      		tmp = t_1;
      	elseif (y <= -3.4e-65)
      		tmp = Float64(a * Float64(1.0 - t));
      	elseif (y <= 3.9e+45)
      		tmp = fma(Float64(t - 2.0), b, Float64(x + z));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.85e+15], t$95$1, If[LessEqual[y, -3.4e-65], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.9e+45], N[(N[(t - 2.0), $MachinePrecision] * b + N[(x + z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
      
      \begin{array}{l}
      t_1 := y \cdot \left(b - z\right)\\
      \mathbf{if}\;y \leq -1.85 \cdot 10^{+15}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;y \leq -3.4 \cdot 10^{-65}:\\
      \;\;\;\;a \cdot \left(1 - t\right)\\
      
      \mathbf{elif}\;y \leq 3.9 \cdot 10^{+45}:\\
      \;\;\;\;\mathsf{fma}\left(t - 2, b, x + z\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if y < -1.85e15 or 3.8999999999999999e45 < y

        1. Initial program 95.3%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. 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--.f6433.5%

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

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

        if -1.85e15 < y < -3.39999999999999987e-65

        1. Initial program 95.3%

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

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

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

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

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

        if -3.39999999999999987e-65 < y < 3.8999999999999999e45

        1. Initial program 95.3%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. 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.1%

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

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

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

          \[\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. sub-flipN/A

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(t - 2, b, x + \left(\mathsf{neg}\left(-1 \cdot z\right)\right)\right) \]
          11. distribute-lft-neg-outN/A

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

            \[\leadsto \mathsf{fma}\left(t - 2, b, x + 1 \cdot z\right) \]
          13. *-lft-identity45.8%

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

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

      Alternative 12: 63.4% accurate, 1.4× speedup?

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

        1. Initial program 95.3%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. 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.1%

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

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

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

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

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

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

        if -2.50000000000000002e40 < b < 1.6500000000000001e-33

        1. Initial program 95.3%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. 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.1%

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

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

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

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

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

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

            \[\leadsto x - z \cdot \left(y - \color{blue}{1}\right) \]
          3. lower--.f6442.5%

            \[\leadsto x - z \cdot \left(y - 1\right) \]
        10. Applied rewrites42.5%

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

      Alternative 13: 59.4% accurate, 1.7× speedup?

      \[\begin{array}{l} t_1 := b \cdot \left(\left(t + y\right) - 2\right)\\ \mathbf{if}\;b \leq -1.7 \cdot 10^{+139}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 1.65 \cdot 10^{-33}:\\ \;\;\;\;x - z \cdot \left(y - 1\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (* b (- (+ t y) 2.0))))
         (if (<= b -1.7e+139) t_1 (if (<= b 1.65e-33) (- x (* z (- y 1.0))) t_1))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = b * ((t + y) - 2.0);
      	double tmp;
      	if (b <= -1.7e+139) {
      		tmp = t_1;
      	} else if (b <= 1.65e-33) {
      		tmp = x - (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 = b * ((t + y) - 2.0d0)
          if (b <= (-1.7d+139)) then
              tmp = t_1
          else if (b <= 1.65d-33) then
              tmp = x - (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 = b * ((t + y) - 2.0);
      	double tmp;
      	if (b <= -1.7e+139) {
      		tmp = t_1;
      	} else if (b <= 1.65e-33) {
      		tmp = x - (z * (y - 1.0));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = b * ((t + y) - 2.0)
      	tmp = 0
      	if b <= -1.7e+139:
      		tmp = t_1
      	elif b <= 1.65e-33:
      		tmp = x - (z * (y - 1.0))
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(b * Float64(Float64(t + y) - 2.0))
      	tmp = 0.0
      	if (b <= -1.7e+139)
      		tmp = t_1;
      	elseif (b <= 1.65e-33)
      		tmp = Float64(x - 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 = b * ((t + y) - 2.0);
      	tmp = 0.0;
      	if (b <= -1.7e+139)
      		tmp = t_1;
      	elseif (b <= 1.65e-33)
      		tmp = x - (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[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.7e+139], t$95$1, If[LessEqual[b, 1.65e-33], N[(x - N[(z * N[(y - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      t_1 := b \cdot \left(\left(t + y\right) - 2\right)\\
      \mathbf{if}\;b \leq -1.7 \cdot 10^{+139}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;b \leq 1.65 \cdot 10^{-33}:\\
      \;\;\;\;x - z \cdot \left(y - 1\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if b < -1.7000000000000001e139 or 1.6500000000000001e-33 < b

        1. Initial program 95.3%

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

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

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

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

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

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

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

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

            \[\leadsto b \cdot \left(\left(t + y\right) - 2\right) - \mathsf{fma}\left(a, t - 1, z \cdot \left(y - 1\right)\right) \]
          8. lower--.f6481.3%

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto b \cdot \left(\left(t + y\right) - 2\right) \]
        10. Applied rewrites36.7%

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

        if -1.7000000000000001e139 < b < 1.6500000000000001e-33

        1. Initial program 95.3%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. 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.1%

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

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

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

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

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

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

            \[\leadsto x - z \cdot \left(y - \color{blue}{1}\right) \]
          3. lower--.f6442.5%

            \[\leadsto x - z \cdot \left(y - 1\right) \]
        10. Applied rewrites42.5%

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

      Alternative 14: 58.8% accurate, 1.4× speedup?

      \[\begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -1.85 \cdot 10^{+15}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{-65}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 3.9 \cdot 10^{+45}:\\ \;\;\;\;x + b \cdot \left(t - 2\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.85e+15)
           t_1
           (if (<= y -1.7e-65)
             (* a (- 1.0 t))
             (if (<= y 3.9e+45) (+ x (* b (- t 2.0))) 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.85e+15) {
      		tmp = t_1;
      	} else if (y <= -1.7e-65) {
      		tmp = a * (1.0 - t);
      	} else if (y <= 3.9e+45) {
      		tmp = x + (b * (t - 2.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 = y * (b - z)
          if (y <= (-1.85d+15)) then
              tmp = t_1
          else if (y <= (-1.7d-65)) then
              tmp = a * (1.0d0 - t)
          else if (y <= 3.9d+45) then
              tmp = x + (b * (t - 2.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 = y * (b - z);
      	double tmp;
      	if (y <= -1.85e+15) {
      		tmp = t_1;
      	} else if (y <= -1.7e-65) {
      		tmp = a * (1.0 - t);
      	} else if (y <= 3.9e+45) {
      		tmp = x + (b * (t - 2.0));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = y * (b - z)
      	tmp = 0
      	if y <= -1.85e+15:
      		tmp = t_1
      	elif y <= -1.7e-65:
      		tmp = a * (1.0 - t)
      	elif y <= 3.9e+45:
      		tmp = x + (b * (t - 2.0))
      	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.85e+15)
      		tmp = t_1;
      	elseif (y <= -1.7e-65)
      		tmp = Float64(a * Float64(1.0 - t));
      	elseif (y <= 3.9e+45)
      		tmp = Float64(x + Float64(b * Float64(t - 2.0)));
      	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.85e+15)
      		tmp = t_1;
      	elseif (y <= -1.7e-65)
      		tmp = a * (1.0 - t);
      	elseif (y <= 3.9e+45)
      		tmp = x + (b * (t - 2.0));
      	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.85e+15], t$95$1, If[LessEqual[y, -1.7e-65], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.9e+45], N[(x + N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
      
      \begin{array}{l}
      t_1 := y \cdot \left(b - z\right)\\
      \mathbf{if}\;y \leq -1.85 \cdot 10^{+15}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;y \leq -1.7 \cdot 10^{-65}:\\
      \;\;\;\;a \cdot \left(1 - t\right)\\
      
      \mathbf{elif}\;y \leq 3.9 \cdot 10^{+45}:\\
      \;\;\;\;x + b \cdot \left(t - 2\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if y < -1.85e15 or 3.8999999999999999e45 < y

        1. Initial program 95.3%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. 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--.f6433.5%

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

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

        if -1.85e15 < y < -1.69999999999999993e-65

        1. Initial program 95.3%

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

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

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

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

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

        if -1.69999999999999993e-65 < y < 3.8999999999999999e45

        1. Initial program 95.3%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. 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.1%

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

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

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

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

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

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

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

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

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

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

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

      Alternative 15: 56.3% accurate, 1.7× speedup?

      \[\begin{array}{l} t_1 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -1.32 \cdot 10^{+42}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+45}:\\ \;\;\;\;x - z \cdot \left(y - 1\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (* t (- b a))))
         (if (<= t -1.32e+42) t_1 (if (<= t 5.2e+45) (- x (* z (- y 1.0))) t_1))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = t * (b - a);
      	double tmp;
      	if (t <= -1.32e+42) {
      		tmp = t_1;
      	} else if (t <= 5.2e+45) {
      		tmp = x - (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 = t * (b - a)
          if (t <= (-1.32d+42)) then
              tmp = t_1
          else if (t <= 5.2d+45) then
              tmp = x - (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 = t * (b - a);
      	double tmp;
      	if (t <= -1.32e+42) {
      		tmp = t_1;
      	} else if (t <= 5.2e+45) {
      		tmp = x - (z * (y - 1.0));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = t * (b - a)
      	tmp = 0
      	if t <= -1.32e+42:
      		tmp = t_1
      	elif t <= 5.2e+45:
      		tmp = x - (z * (y - 1.0))
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(t * Float64(b - a))
      	tmp = 0.0
      	if (t <= -1.32e+42)
      		tmp = t_1;
      	elseif (t <= 5.2e+45)
      		tmp = Float64(x - 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 = t * (b - a);
      	tmp = 0.0;
      	if (t <= -1.32e+42)
      		tmp = t_1;
      	elseif (t <= 5.2e+45)
      		tmp = x - (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[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.32e+42], t$95$1, If[LessEqual[t, 5.2e+45], N[(x - N[(z * N[(y - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      t_1 := t \cdot \left(b - a\right)\\
      \mathbf{if}\;t \leq -1.32 \cdot 10^{+42}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t \leq 5.2 \cdot 10^{+45}:\\
      \;\;\;\;x - z \cdot \left(y - 1\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if t < -1.32e42 or 5.20000000000000014e45 < t

        1. Initial program 95.3%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. 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.0%

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

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

        if -1.32e42 < t < 5.20000000000000014e45

        1. Initial program 95.3%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. 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.1%

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

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

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

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

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

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

            \[\leadsto x - z \cdot \left(y - \color{blue}{1}\right) \]
          3. lower--.f6442.5%

            \[\leadsto x - z \cdot \left(y - 1\right) \]
        10. Applied rewrites42.5%

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

      Alternative 16: 49.6% accurate, 1.1× speedup?

      \[\begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -1.85 \cdot 10^{+15}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -2.7 \cdot 10^{-73}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq -1.28 \cdot 10^{-300}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-151}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{+73}:\\ \;\;\;\;x - a \cdot t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (* y (- b z))))
         (if (<= y -1.85e+15)
           t_1
           (if (<= y -2.7e-73)
             (* a (- 1.0 t))
             (if (<= y -1.28e-300)
               (* b (- t 2.0))
               (if (<= y 3.4e-151)
                 (+ z x)
                 (if (<= y 3.5e+73) (- x (* a t)) 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.85e+15) {
      		tmp = t_1;
      	} else if (y <= -2.7e-73) {
      		tmp = a * (1.0 - t);
      	} else if (y <= -1.28e-300) {
      		tmp = b * (t - 2.0);
      	} else if (y <= 3.4e-151) {
      		tmp = z + x;
      	} else if (y <= 3.5e+73) {
      		tmp = x - (a * t);
      	} 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.85d+15)) then
              tmp = t_1
          else if (y <= (-2.7d-73)) then
              tmp = a * (1.0d0 - t)
          else if (y <= (-1.28d-300)) then
              tmp = b * (t - 2.0d0)
          else if (y <= 3.4d-151) then
              tmp = z + x
          else if (y <= 3.5d+73) then
              tmp = x - (a * t)
          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.85e+15) {
      		tmp = t_1;
      	} else if (y <= -2.7e-73) {
      		tmp = a * (1.0 - t);
      	} else if (y <= -1.28e-300) {
      		tmp = b * (t - 2.0);
      	} else if (y <= 3.4e-151) {
      		tmp = z + x;
      	} else if (y <= 3.5e+73) {
      		tmp = x - (a * t);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = y * (b - z)
      	tmp = 0
      	if y <= -1.85e+15:
      		tmp = t_1
      	elif y <= -2.7e-73:
      		tmp = a * (1.0 - t)
      	elif y <= -1.28e-300:
      		tmp = b * (t - 2.0)
      	elif y <= 3.4e-151:
      		tmp = z + x
      	elif y <= 3.5e+73:
      		tmp = x - (a * t)
      	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.85e+15)
      		tmp = t_1;
      	elseif (y <= -2.7e-73)
      		tmp = Float64(a * Float64(1.0 - t));
      	elseif (y <= -1.28e-300)
      		tmp = Float64(b * Float64(t - 2.0));
      	elseif (y <= 3.4e-151)
      		tmp = Float64(z + x);
      	elseif (y <= 3.5e+73)
      		tmp = Float64(x - Float64(a * t));
      	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.85e+15)
      		tmp = t_1;
      	elseif (y <= -2.7e-73)
      		tmp = a * (1.0 - t);
      	elseif (y <= -1.28e-300)
      		tmp = b * (t - 2.0);
      	elseif (y <= 3.4e-151)
      		tmp = z + x;
      	elseif (y <= 3.5e+73)
      		tmp = x - (a * t);
      	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.85e+15], t$95$1, If[LessEqual[y, -2.7e-73], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.28e-300], N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.4e-151], N[(z + x), $MachinePrecision], If[LessEqual[y, 3.5e+73], N[(x - N[(a * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
      
      \begin{array}{l}
      t_1 := y \cdot \left(b - z\right)\\
      \mathbf{if}\;y \leq -1.85 \cdot 10^{+15}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;y \leq -2.7 \cdot 10^{-73}:\\
      \;\;\;\;a \cdot \left(1 - t\right)\\
      
      \mathbf{elif}\;y \leq -1.28 \cdot 10^{-300}:\\
      \;\;\;\;b \cdot \left(t - 2\right)\\
      
      \mathbf{elif}\;y \leq 3.4 \cdot 10^{-151}:\\
      \;\;\;\;z + x\\
      
      \mathbf{elif}\;y \leq 3.5 \cdot 10^{+73}:\\
      \;\;\;\;x - a \cdot t\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 5 regimes
      2. if y < -1.85e15 or 3.50000000000000002e73 < y

        1. Initial program 95.3%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. 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--.f6433.5%

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

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

        if -1.85e15 < y < -2.69999999999999994e-73

        1. Initial program 95.3%

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

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

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

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

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

        if -2.69999999999999994e-73 < y < -1.28e-300

        1. Initial program 95.3%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. 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.1%

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

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

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

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

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

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

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

            \[\leadsto b \cdot \left(t - 2\right) \]
          2. lower--.f6423.3%

            \[\leadsto b \cdot \left(t - 2\right) \]
        13. Applied rewrites23.3%

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

        if -1.28e-300 < y < 3.4000000000000003e-151

        1. Initial program 95.3%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. 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.1%

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

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

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

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

            \[\leadsto x - -1 \cdot z \]
        10. Applied rewrites24.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-identity24.4%

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

          \[\leadsto z + x \]

        if 3.4000000000000003e-151 < y < 3.50000000000000002e73

        1. Initial program 95.3%

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

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

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

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

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

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

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

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

            \[\leadsto b \cdot \left(\left(t + y\right) - 2\right) - \mathsf{fma}\left(a, t - 1, z \cdot \left(y - 1\right)\right) \]
          8. lower--.f6481.3%

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

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

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

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

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

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

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

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

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

          \[\leadsto x - a \cdot \color{blue}{t} \]
        9. Step-by-step derivation
          1. lower-*.f6433.4%

            \[\leadsto x - a \cdot t \]
        10. Applied rewrites33.4%

          \[\leadsto x - a \cdot \color{blue}{t} \]
      3. Recombined 5 regimes into one program.
      4. Add Preprocessing

      Alternative 17: 49.0% accurate, 1.3× speedup?

      \[\begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -1.85 \cdot 10^{+15}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -2.7 \cdot 10^{-73}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq -1.28 \cdot 10^{-300}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq 9.6 \cdot 10^{+42}:\\ \;\;\;\;z + x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (* y (- b z))))
         (if (<= y -1.85e+15)
           t_1
           (if (<= y -2.7e-73)
             (* a (- 1.0 t))
             (if (<= y -1.28e-300)
               (* b (- t 2.0))
               (if (<= y 9.6e+42) (+ z x) 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.85e+15) {
      		tmp = t_1;
      	} else if (y <= -2.7e-73) {
      		tmp = a * (1.0 - t);
      	} else if (y <= -1.28e-300) {
      		tmp = b * (t - 2.0);
      	} else if (y <= 9.6e+42) {
      		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 = y * (b - z)
          if (y <= (-1.85d+15)) then
              tmp = t_1
          else if (y <= (-2.7d-73)) then
              tmp = a * (1.0d0 - t)
          else if (y <= (-1.28d-300)) then
              tmp = b * (t - 2.0d0)
          else if (y <= 9.6d+42) 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 = y * (b - z);
      	double tmp;
      	if (y <= -1.85e+15) {
      		tmp = t_1;
      	} else if (y <= -2.7e-73) {
      		tmp = a * (1.0 - t);
      	} else if (y <= -1.28e-300) {
      		tmp = b * (t - 2.0);
      	} else if (y <= 9.6e+42) {
      		tmp = z + x;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = y * (b - z)
      	tmp = 0
      	if y <= -1.85e+15:
      		tmp = t_1
      	elif y <= -2.7e-73:
      		tmp = a * (1.0 - t)
      	elif y <= -1.28e-300:
      		tmp = b * (t - 2.0)
      	elif y <= 9.6e+42:
      		tmp = z + x
      	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.85e+15)
      		tmp = t_1;
      	elseif (y <= -2.7e-73)
      		tmp = Float64(a * Float64(1.0 - t));
      	elseif (y <= -1.28e-300)
      		tmp = Float64(b * Float64(t - 2.0));
      	elseif (y <= 9.6e+42)
      		tmp = Float64(z + x);
      	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.85e+15)
      		tmp = t_1;
      	elseif (y <= -2.7e-73)
      		tmp = a * (1.0 - t);
      	elseif (y <= -1.28e-300)
      		tmp = b * (t - 2.0);
      	elseif (y <= 9.6e+42)
      		tmp = z + x;
      	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.85e+15], t$95$1, If[LessEqual[y, -2.7e-73], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.28e-300], N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.6e+42], N[(z + x), $MachinePrecision], t$95$1]]]]]
      
      \begin{array}{l}
      t_1 := y \cdot \left(b - z\right)\\
      \mathbf{if}\;y \leq -1.85 \cdot 10^{+15}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;y \leq -2.7 \cdot 10^{-73}:\\
      \;\;\;\;a \cdot \left(1 - t\right)\\
      
      \mathbf{elif}\;y \leq -1.28 \cdot 10^{-300}:\\
      \;\;\;\;b \cdot \left(t - 2\right)\\
      
      \mathbf{elif}\;y \leq 9.6 \cdot 10^{+42}:\\
      \;\;\;\;z + x\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if y < -1.85e15 or 9.5999999999999994e42 < y

        1. Initial program 95.3%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. 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--.f6433.5%

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

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

        if -1.85e15 < y < -2.69999999999999994e-73

        1. Initial program 95.3%

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

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

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

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

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

        if -2.69999999999999994e-73 < y < -1.28e-300

        1. Initial program 95.3%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. 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.1%

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

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

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

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

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

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

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

            \[\leadsto b \cdot \left(t - 2\right) \]
          2. lower--.f6423.3%

            \[\leadsto b \cdot \left(t - 2\right) \]
        13. Applied rewrites23.3%

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

        if -1.28e-300 < y < 9.5999999999999994e42

        1. Initial program 95.3%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. 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.1%

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

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

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

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

            \[\leadsto x - -1 \cdot z \]
        10. Applied rewrites24.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-identity24.4%

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

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

      Alternative 18: 47.3% accurate, 2.0× speedup?

      \[\begin{array}{l} t_1 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -1 \cdot 10^{+40}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+45}:\\ \;\;\;\;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 -1e+40) t_1 (if (<= t 5.2e+45) (+ 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 <= -1e+40) {
      		tmp = t_1;
      	} else if (t <= 5.2e+45) {
      		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 <= (-1d+40)) then
              tmp = t_1
          else if (t <= 5.2d+45) 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 <= -1e+40) {
      		tmp = t_1;
      	} else if (t <= 5.2e+45) {
      		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 <= -1e+40:
      		tmp = t_1
      	elif t <= 5.2e+45:
      		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 <= -1e+40)
      		tmp = t_1;
      	elseif (t <= 5.2e+45)
      		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 <= -1e+40)
      		tmp = t_1;
      	elseif (t <= 5.2e+45)
      		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, -1e+40], t$95$1, If[LessEqual[t, 5.2e+45], N[(z + x), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      t_1 := t \cdot \left(b - a\right)\\
      \mathbf{if}\;t \leq -1 \cdot 10^{+40}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t \leq 5.2 \cdot 10^{+45}:\\
      \;\;\;\;z + x\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if t < -1.00000000000000003e40 or 5.20000000000000014e45 < t

        1. Initial program 95.3%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. 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.0%

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

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

        if -1.00000000000000003e40 < t < 5.20000000000000014e45

        1. Initial program 95.3%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. 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.1%

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

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

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

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

            \[\leadsto x - -1 \cdot z \]
        10. Applied rewrites24.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-identity24.4%

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

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

      Alternative 19: 40.7% accurate, 2.0× speedup?

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

        1. Initial program 95.3%

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

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

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

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

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

        if -3.4e14 < a < 1.95000000000000007e133

        1. Initial program 95.3%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. 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.1%

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

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

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

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

            \[\leadsto x - -1 \cdot z \]
        10. Applied rewrites24.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-identity24.4%

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

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

      Alternative 20: 36.6% accurate, 2.0× speedup?

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

        1. Initial program 95.3%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. 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.1%

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

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

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

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

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

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

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

            \[\leadsto b \cdot \left(t - 2\right) \]
          2. lower--.f6423.3%

            \[\leadsto b \cdot \left(t - 2\right) \]
        13. Applied rewrites23.3%

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

        if -2.0000000000000001e138 < b < 1.1e-26

        1. Initial program 95.3%

          \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
        2. 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.1%

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

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

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

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

            \[\leadsto x - -1 \cdot z \]
        10. Applied rewrites24.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-identity24.4%

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

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

      Alternative 21: 34.8% accurate, 1.9× speedup?

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

        1. Initial program 95.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto t \cdot b \]
        8. Step-by-step derivation
          1. Applied rewrites17.4%

            \[\leadsto t \cdot b \]

          if -3.0000000000000002e145 < b < 2.30000000000000004e-42

          1. Initial program 95.3%

            \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
          2. 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.1%

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

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

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

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

              \[\leadsto x - -1 \cdot z \]
          10. Applied rewrites24.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-identity24.4%

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

            \[\leadsto z + x \]

          if 2.30000000000000004e-42 < b < 7.4999999999999996e188

          1. Initial program 95.3%

            \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
          2. 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--.f6433.5%

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

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

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

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

          Alternative 22: 34.2% accurate, 2.3× speedup?

          \[\begin{array}{l} t_1 := \left(-t\right) \cdot a\\ \mathbf{if}\;t \leq -1.65 \cdot 10^{+47}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+45}:\\ \;\;\;\;z + x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (let* ((t_1 (* (- t) a)))
             (if (<= t -1.65e+47) t_1 (if (<= t 5.2e+45) (+ z x) t_1))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double t_1 = -t * a;
          	double tmp;
          	if (t <= -1.65e+47) {
          		tmp = t_1;
          	} else if (t <= 5.2e+45) {
          		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 * a
              if (t <= (-1.65d+47)) then
                  tmp = t_1
              else if (t <= 5.2d+45) 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 * a;
          	double tmp;
          	if (t <= -1.65e+47) {
          		tmp = t_1;
          	} else if (t <= 5.2e+45) {
          		tmp = z + x;
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a, b):
          	t_1 = -t * a
          	tmp = 0
          	if t <= -1.65e+47:
          		tmp = t_1
          	elif t <= 5.2e+45:
          		tmp = z + x
          	else:
          		tmp = t_1
          	return tmp
          
          function code(x, y, z, t, a, b)
          	t_1 = Float64(Float64(-t) * a)
          	tmp = 0.0
          	if (t <= -1.65e+47)
          		tmp = t_1;
          	elseif (t <= 5.2e+45)
          		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 * a;
          	tmp = 0.0;
          	if (t <= -1.65e+47)
          		tmp = t_1;
          	elseif (t <= 5.2e+45)
          		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) * a), $MachinePrecision]}, If[LessEqual[t, -1.65e+47], t$95$1, If[LessEqual[t, 5.2e+45], N[(z + x), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          t_1 := \left(-t\right) \cdot a\\
          \mathbf{if}\;t \leq -1.65 \cdot 10^{+47}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;t \leq 5.2 \cdot 10^{+45}:\\
          \;\;\;\;z + x\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if t < -1.65e47 or 5.20000000000000014e45 < t

            1. Initial program 95.3%

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(-1 \cdot t\right) \cdot \color{blue}{a} \]
              3. lower-*.f6419.7%

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

                \[\leadsto \left(-1 \cdot t\right) \cdot a \]
              5. mul-1-negN/A

                \[\leadsto \left(\mathsf{neg}\left(t\right)\right) \cdot a \]
              6. lower-neg.f6419.7%

                \[\leadsto \left(-t\right) \cdot a \]
            9. Applied rewrites19.7%

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

            if -1.65e47 < t < 5.20000000000000014e45

            1. Initial program 95.3%

              \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
            2. 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.1%

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

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

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

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

                \[\leadsto x - -1 \cdot z \]
            10. Applied rewrites24.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-identity24.4%

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

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

          Alternative 23: 31.9% accurate, 2.5× speedup?

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

            1. Initial program 95.3%

              \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
            2. 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--.f6433.5%

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

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

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

                \[\leadsto y \cdot b \]

              if -4.60000000000000004e49 < y < 4.59999999999999969e124

              1. Initial program 95.3%

                \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
              2. 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.1%

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

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

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

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

                  \[\leadsto x - -1 \cdot z \]
              10. Applied rewrites24.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-identity24.4%

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

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

            Alternative 24: 28.8% accurate, 2.5× speedup?

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

              1. Initial program 95.3%

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

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

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

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

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

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

                  \[\leadsto a \]

                if -9.1999999999999996e133 < a < 1.95000000000000007e133

                1. Initial program 95.3%

                  \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                2. 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.1%

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

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

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

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

                    \[\leadsto x - -1 \cdot z \]
                10. Applied rewrites24.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-identity24.4%

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

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

              Alternative 25: 16.5% accurate, 3.3× speedup?

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

                1. Initial program 95.3%

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

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

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

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

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

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

                    \[\leadsto a \]

                  if -8.1999999999999999e33 < a < 1.12e133

                  1. Initial program 95.3%

                    \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                  2. 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.1%

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

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

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

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

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

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

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

                      \[\leadsto z \]
                  13. Recombined 2 regimes into one program.
                  14. Add Preprocessing

                  Alternative 26: 11.3% accurate, 28.4× speedup?

                  \[a \]
                  (FPCore (x y z t a b) :precision binary64 a)
                  double code(double x, double y, double z, double t, double a, double b) {
                  	return a;
                  }
                  
                  module fmin_fmax_functions
                      implicit none
                      private
                      public fmax
                      public fmin
                  
                      interface fmax
                          module procedure fmax88
                          module procedure fmax44
                          module procedure fmax84
                          module procedure fmax48
                      end interface
                      interface fmin
                          module procedure fmin88
                          module procedure fmin44
                          module procedure fmin84
                          module procedure fmin48
                      end interface
                  contains
                      real(8) function fmax88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmax44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmax84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmax48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                      end function
                      real(8) function fmin88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmin44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmin84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmin48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                      end function
                  end module
                  
                  real(8) function code(x, y, z, t, a, b)
                  use fmin_fmax_functions
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8), intent (in) :: z
                      real(8), intent (in) :: t
                      real(8), intent (in) :: a
                      real(8), intent (in) :: b
                      code = a
                  end function
                  
                  public static double code(double x, double y, double z, double t, double a, double b) {
                  	return a;
                  }
                  
                  def code(x, y, z, t, a, b):
                  	return a
                  
                  function code(x, y, z, t, a, b)
                  	return a
                  end
                  
                  function tmp = code(x, y, z, t, a, b)
                  	tmp = a;
                  end
                  
                  code[x_, y_, z_, t_, a_, b_] := a
                  
                  a
                  
                  Derivation
                  1. Initial program 95.3%

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

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

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

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

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

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

                      \[\leadsto a \]
                    2. Add Preprocessing

                    Reproduce

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