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

Percentage Accurate: 95.4% → 97.7%
Time: 9.0s
Alternatives: 17
Speedup: 1.1×

Specification

?
\[\begin{array}{l} \\ \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
	return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 95.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
	return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

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

Alternative 1: 97.7% accurate, 1.1× speedup?

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

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

    \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
  2. Add Preprocessing
  3. 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. 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 \]
    3. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(\left(y + t\right) - 2, b, \mathsf{fma}\left(1 - y, z, x - a \cdot \left(t - 1\right)\right)\right) \]
    15. lift--.f6498.4

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

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

Alternative 2: 87.5% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -9.5 \cdot 10^{+188}:\\
\;\;\;\;\mathsf{fma}\left(\left(t + y\right) - 2, b, \left(-a\right) \cdot t\right)\\

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

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


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

    1. Initial program 91.7%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. 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. 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 \]
      3. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \]
      6. lower-neg.f6495.5

        \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \left(-a\right) \cdot t\right) \]
    7. Applied rewrites95.5%

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

    if -9.4999999999999996e188 < b < 9.9000000000000005e157

    1. Initial program 97.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. 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. 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 \]
      3. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\left(y + t\right) - 2, b, \mathsf{fma}\left(1 - y, z, x - a \cdot \left(t - 1\right)\right)\right) \]
      15. lift--.f64100.0

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

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

      \[\leadsto \mathsf{fma}\left(\color{blue}{y}, b, \mathsf{fma}\left(1 - y, z, x - a \cdot \left(t - 1\right)\right)\right) \]
    11. Step-by-step derivation
      1. Applied rewrites93.4%

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

      if 9.9000000000000005e157 < b

      1. Initial program 90.0%

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

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

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

      Alternative 3: 28.8% accurate, 1.0× speedup?

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

        1. Initial program 92.7%

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

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

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

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

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

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

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

            \[\leadsto \left(\mathsf{neg}\left(y\right)\right) \cdot z \]
          2. lower-neg.f6447.0

            \[\leadsto \left(-y\right) \cdot z \]
        8. Applied rewrites47.0%

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

        if -1.5e17 < y < -8.20000000000000048e-96 or 6.99999999999999975e-174 < y < 16500

        1. Initial program 98.2%

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

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

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

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

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

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

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

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

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

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

        if -8.20000000000000048e-96 < y < -1.65e-258

        1. Initial program 100.0%

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

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

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

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

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

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

          \[\leadsto a \]
        7. Step-by-step derivation
          1. Applied rewrites36.5%

            \[\leadsto a \]

          if -1.65e-258 < y < 6.99999999999999975e-174

          1. Initial program 100.0%

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

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

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

          Alternative 4: 86.6% accurate, 1.1× speedup?

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

            1. Initial program 94.3%

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

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

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

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

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

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

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

                \[\leadsto x - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right) \]
              7. lift--.f6487.8

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

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

            if -1.7199999999999999e140 < a < 6.49999999999999931e60

            1. Initial program 96.4%

              \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
            2. Add Preprocessing
            3. 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. 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 \]
              3. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \mathsf{fma}\left(1 - y, z, x\right)\right) \]
              4. lift--.f6492.1

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

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

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

          Alternative 5: 49.5% accurate, 1.1× speedup?

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

            1. Initial program 92.4%

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

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

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

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

                \[\leadsto \left(b - z\right) \cdot y \]
            5. Applied rewrites72.7%

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

            if -6.7999999999999996e47 < y < -1.05999999999999999e-244

            1. Initial program 100.0%

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

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

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

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

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

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

            if -1.05999999999999999e-244 < y < 2.5000000000000001e-173

            1. Initial program 100.0%

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

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

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

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

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

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

                  \[\leadsto x + \left(t - 2\right) \cdot b \]
              4. Applied rewrites63.7%

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

                \[\leadsto x + -2 \cdot b \]
              6. Step-by-step derivation
                1. Applied rewrites45.3%

                  \[\leadsto x + -2 \cdot b \]

                if 2.5000000000000001e-173 < y < 4.5e13

                1. Initial program 97.3%

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

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

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

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

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

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

              Alternative 6: 82.5% accurate, 1.1× speedup?

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

                1. Initial program 90.3%

                  \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
                2. Add Preprocessing
                3. 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. 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 \]
                  3. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \]
                  6. lower-neg.f6488.9

                    \[\leadsto \mathsf{fma}\left(\left(t + y\right) - 2, b, \left(-a\right) \cdot t\right) \]
                7. Applied rewrites88.9%

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

                if -1.04999999999999999e148 < b < 4.79999999999999975e109

                1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

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

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

              Alternative 7: 97.4% accurate, 1.1× speedup?

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

                \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
              2. Add Preprocessing
              3. 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. 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 \]
                3. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 8: 55.6% accurate, 1.2× speedup?

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

                1. Initial program 92.4%

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

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

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

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

                    \[\leadsto \left(b - z\right) \cdot y \]
                5. Applied rewrites72.7%

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

                if -6.7999999999999996e47 < y < -1.8e-140

                1. Initial program 100.0%

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

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

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

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

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

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

                if -1.8e-140 < y < 8.2e12

                1. Initial program 98.9%

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

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

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

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

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

                      \[\leadsto x + \left(t - 2\right) \cdot \color{blue}{b} \]
                    3. lower--.f6453.8

                      \[\leadsto x + \left(t - 2\right) \cdot b \]
                  4. Applied rewrites53.8%

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

                Alternative 9: 60.9% accurate, 1.4× speedup?

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

                  1. Initial program 94.4%

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

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

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

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

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

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

                  if -3.40000000000000023e116 < z < 2.70000000000000016e88

                  1. Initial program 96.4%

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

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

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.4 \cdot 10^{+116} \lor \neg \left(z \leq 2.7 \cdot 10^{+88}\right):\\ \;\;\;\;\left(1 - y\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;x + \left(\left(y + t\right) - 2\right) \cdot b\\ \end{array} \]
                  7. Add Preprocessing

                  Alternative 10: 27.2% accurate, 1.4× speedup?

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

                    1. Initial program 92.5%

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

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

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

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

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

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

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

                        \[\leadsto \left(\mathsf{neg}\left(y\right)\right) \cdot z \]
                      2. lower-neg.f6446.5

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

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

                    if -6.7999999999999996e47 < y < -1.65e-258

                    1. Initial program 100.0%

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

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

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

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

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

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

                      \[\leadsto a \]
                    7. Step-by-step derivation
                      1. Applied rewrites27.9%

                        \[\leadsto a \]

                      if -1.65e-258 < y < 1.3e-18

                      1. Initial program 98.5%

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

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

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

                      Alternative 11: 22.0% accurate, 1.5× speedup?

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

                        1. Initial program 98.8%

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

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

                            \[\leadsto \color{blue}{x} \]

                          if -1.87300000000000014e141 < x < 5.20000000000000006e-231

                          1. Initial program 92.9%

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

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

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

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

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

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

                            \[\leadsto a \]
                          7. Step-by-step derivation
                            1. Applied rewrites19.9%

                              \[\leadsto a \]

                            if 5.20000000000000006e-231 < x < 2.5000000000000001e75

                            1. Initial program 96.7%

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

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

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

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

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

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

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

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

                            Alternative 12: 48.9% accurate, 1.8× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -6.8 \cdot 10^{+47} \lor \neg \left(y \leq 1.6 \cdot 10^{+50}\right):\\ \;\;\;\;\left(b - z\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;\left(1 - t\right) \cdot a\\ \end{array} \end{array} \]
                            (FPCore (x y z t a b)
                             :precision binary64
                             (if (or (<= y -6.8e+47) (not (<= y 1.6e+50))) (* (- b z) y) (* (- 1.0 t) a)))
                            double code(double x, double y, double z, double t, double a, double b) {
                            	double tmp;
                            	if ((y <= -6.8e+47) || !(y <= 1.6e+50)) {
                            		tmp = (b - z) * y;
                            	} else {
                            		tmp = (1.0 - t) * a;
                            	}
                            	return tmp;
                            }
                            
                            module fmin_fmax_functions
                                implicit none
                                private
                                public fmax
                                public fmin
                            
                                interface fmax
                                    module procedure fmax88
                                    module procedure fmax44
                                    module procedure fmax84
                                    module procedure fmax48
                                end interface
                                interface fmin
                                    module procedure fmin88
                                    module procedure fmin44
                                    module procedure fmin84
                                    module procedure fmin48
                                end interface
                            contains
                                real(8) function fmax88(x, y) result (res)
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                end function
                                real(4) function fmax44(x, y) result (res)
                                    real(4), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                end function
                                real(8) function fmax84(x, y) result(res)
                                    real(8), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                end function
                                real(8) function fmax48(x, y) result(res)
                                    real(4), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                end function
                                real(8) function fmin88(x, y) result (res)
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                end function
                                real(4) function fmin44(x, y) result (res)
                                    real(4), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                end function
                                real(8) function fmin84(x, y) result(res)
                                    real(8), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                end function
                                real(8) function fmin48(x, y) result(res)
                                    real(4), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                end function
                            end module
                            
                            real(8) function code(x, y, z, t, a, b)
                            use fmin_fmax_functions
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                real(8), intent (in) :: z
                                real(8), intent (in) :: t
                                real(8), intent (in) :: a
                                real(8), intent (in) :: b
                                real(8) :: tmp
                                if ((y <= (-6.8d+47)) .or. (.not. (y <= 1.6d+50))) then
                                    tmp = (b - z) * y
                                else
                                    tmp = (1.0d0 - t) * a
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double x, double y, double z, double t, double a, double b) {
                            	double tmp;
                            	if ((y <= -6.8e+47) || !(y <= 1.6e+50)) {
                            		tmp = (b - z) * y;
                            	} else {
                            		tmp = (1.0 - t) * a;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z, t, a, b):
                            	tmp = 0
                            	if (y <= -6.8e+47) or not (y <= 1.6e+50):
                            		tmp = (b - z) * y
                            	else:
                            		tmp = (1.0 - t) * a
                            	return tmp
                            
                            function code(x, y, z, t, a, b)
                            	tmp = 0.0
                            	if ((y <= -6.8e+47) || !(y <= 1.6e+50))
                            		tmp = Float64(Float64(b - z) * y);
                            	else
                            		tmp = Float64(Float64(1.0 - t) * a);
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y, z, t, a, b)
                            	tmp = 0.0;
                            	if ((y <= -6.8e+47) || ~((y <= 1.6e+50)))
                            		tmp = (b - z) * y;
                            	else
                            		tmp = (1.0 - t) * a;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -6.8e+47], N[Not[LessEqual[y, 1.6e+50]], $MachinePrecision]], N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision], N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;y \leq -6.8 \cdot 10^{+47} \lor \neg \left(y \leq 1.6 \cdot 10^{+50}\right):\\
                            \;\;\;\;\left(b - z\right) \cdot y\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\left(1 - t\right) \cdot a\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if y < -6.7999999999999996e47 or 1.59999999999999991e50 < y

                              1. Initial program 92.0%

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

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

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

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

                                  \[\leadsto \left(b - z\right) \cdot y \]
                              5. Applied rewrites74.4%

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

                              if -6.7999999999999996e47 < y < 1.59999999999999991e50

                              1. Initial program 99.2%

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

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

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

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

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

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

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

                            Alternative 13: 43.4% accurate, 1.8× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -8.5 \cdot 10^{+68} \lor \neg \left(a \leq 6.5 \cdot 10^{+62}\right):\\ \;\;\;\;\left(1 - t\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;\left(1 - y\right) \cdot z\\ \end{array} \end{array} \]
                            (FPCore (x y z t a b)
                             :precision binary64
                             (if (or (<= a -8.5e+68) (not (<= a 6.5e+62)))
                               (* (- 1.0 t) a)
                               (* (- 1.0 y) z)))
                            double code(double x, double y, double z, double t, double a, double b) {
                            	double tmp;
                            	if ((a <= -8.5e+68) || !(a <= 6.5e+62)) {
                            		tmp = (1.0 - t) * a;
                            	} else {
                            		tmp = (1.0 - y) * z;
                            	}
                            	return tmp;
                            }
                            
                            module fmin_fmax_functions
                                implicit none
                                private
                                public fmax
                                public fmin
                            
                                interface fmax
                                    module procedure fmax88
                                    module procedure fmax44
                                    module procedure fmax84
                                    module procedure fmax48
                                end interface
                                interface fmin
                                    module procedure fmin88
                                    module procedure fmin44
                                    module procedure fmin84
                                    module procedure fmin48
                                end interface
                            contains
                                real(8) function fmax88(x, y) result (res)
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                end function
                                real(4) function fmax44(x, y) result (res)
                                    real(4), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                end function
                                real(8) function fmax84(x, y) result(res)
                                    real(8), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                end function
                                real(8) function fmax48(x, y) result(res)
                                    real(4), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                end function
                                real(8) function fmin88(x, y) result (res)
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                end function
                                real(4) function fmin44(x, y) result (res)
                                    real(4), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                end function
                                real(8) function fmin84(x, y) result(res)
                                    real(8), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                end function
                                real(8) function fmin48(x, y) result(res)
                                    real(4), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                end function
                            end module
                            
                            real(8) function code(x, y, z, t, a, b)
                            use fmin_fmax_functions
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                real(8), intent (in) :: z
                                real(8), intent (in) :: t
                                real(8), intent (in) :: a
                                real(8), intent (in) :: b
                                real(8) :: tmp
                                if ((a <= (-8.5d+68)) .or. (.not. (a <= 6.5d+62))) then
                                    tmp = (1.0d0 - t) * a
                                else
                                    tmp = (1.0d0 - y) * z
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double x, double y, double z, double t, double a, double b) {
                            	double tmp;
                            	if ((a <= -8.5e+68) || !(a <= 6.5e+62)) {
                            		tmp = (1.0 - t) * a;
                            	} else {
                            		tmp = (1.0 - y) * z;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z, t, a, b):
                            	tmp = 0
                            	if (a <= -8.5e+68) or not (a <= 6.5e+62):
                            		tmp = (1.0 - t) * a
                            	else:
                            		tmp = (1.0 - y) * z
                            	return tmp
                            
                            function code(x, y, z, t, a, b)
                            	tmp = 0.0
                            	if ((a <= -8.5e+68) || !(a <= 6.5e+62))
                            		tmp = Float64(Float64(1.0 - t) * a);
                            	else
                            		tmp = Float64(Float64(1.0 - y) * z);
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y, z, t, a, b)
                            	tmp = 0.0;
                            	if ((a <= -8.5e+68) || ~((a <= 6.5e+62)))
                            		tmp = (1.0 - t) * a;
                            	else
                            		tmp = (1.0 - y) * z;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -8.5e+68], N[Not[LessEqual[a, 6.5e+62]], $MachinePrecision]], N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision], N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;a \leq -8.5 \cdot 10^{+68} \lor \neg \left(a \leq 6.5 \cdot 10^{+62}\right):\\
                            \;\;\;\;\left(1 - t\right) \cdot a\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\left(1 - y\right) \cdot z\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if a < -8.49999999999999966e68 or 6.5000000000000003e62 < a

                              1. Initial program 94.5%

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

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

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

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

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

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

                              if -8.49999999999999966e68 < a < 6.5000000000000003e62

                              1. Initial program 96.6%

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

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

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

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

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

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

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

                            Alternative 14: 36.3% accurate, 1.8× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.4 \cdot 10^{+95} \lor \neg \left(y \leq 5.5 \cdot 10^{+99}\right):\\ \;\;\;\;\left(-y\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;\left(1 - t\right) \cdot a\\ \end{array} \end{array} \]
                            (FPCore (x y z t a b)
                             :precision binary64
                             (if (or (<= y -3.4e+95) (not (<= y 5.5e+99))) (* (- y) z) (* (- 1.0 t) a)))
                            double code(double x, double y, double z, double t, double a, double b) {
                            	double tmp;
                            	if ((y <= -3.4e+95) || !(y <= 5.5e+99)) {
                            		tmp = -y * z;
                            	} else {
                            		tmp = (1.0 - t) * a;
                            	}
                            	return tmp;
                            }
                            
                            module fmin_fmax_functions
                                implicit none
                                private
                                public fmax
                                public fmin
                            
                                interface fmax
                                    module procedure fmax88
                                    module procedure fmax44
                                    module procedure fmax84
                                    module procedure fmax48
                                end interface
                                interface fmin
                                    module procedure fmin88
                                    module procedure fmin44
                                    module procedure fmin84
                                    module procedure fmin48
                                end interface
                            contains
                                real(8) function fmax88(x, y) result (res)
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                end function
                                real(4) function fmax44(x, y) result (res)
                                    real(4), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                end function
                                real(8) function fmax84(x, y) result(res)
                                    real(8), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                end function
                                real(8) function fmax48(x, y) result(res)
                                    real(4), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                end function
                                real(8) function fmin88(x, y) result (res)
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                end function
                                real(4) function fmin44(x, y) result (res)
                                    real(4), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                end function
                                real(8) function fmin84(x, y) result(res)
                                    real(8), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                end function
                                real(8) function fmin48(x, y) result(res)
                                    real(4), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                end function
                            end module
                            
                            real(8) function code(x, y, z, t, a, b)
                            use fmin_fmax_functions
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                real(8), intent (in) :: z
                                real(8), intent (in) :: t
                                real(8), intent (in) :: a
                                real(8), intent (in) :: b
                                real(8) :: tmp
                                if ((y <= (-3.4d+95)) .or. (.not. (y <= 5.5d+99))) then
                                    tmp = -y * z
                                else
                                    tmp = (1.0d0 - t) * a
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double x, double y, double z, double t, double a, double b) {
                            	double tmp;
                            	if ((y <= -3.4e+95) || !(y <= 5.5e+99)) {
                            		tmp = -y * z;
                            	} else {
                            		tmp = (1.0 - t) * a;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z, t, a, b):
                            	tmp = 0
                            	if (y <= -3.4e+95) or not (y <= 5.5e+99):
                            		tmp = -y * z
                            	else:
                            		tmp = (1.0 - t) * a
                            	return tmp
                            
                            function code(x, y, z, t, a, b)
                            	tmp = 0.0
                            	if ((y <= -3.4e+95) || !(y <= 5.5e+99))
                            		tmp = Float64(Float64(-y) * z);
                            	else
                            		tmp = Float64(Float64(1.0 - t) * a);
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y, z, t, a, b)
                            	tmp = 0.0;
                            	if ((y <= -3.4e+95) || ~((y <= 5.5e+99)))
                            		tmp = -y * z;
                            	else
                            		tmp = (1.0 - t) * a;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.4e+95], N[Not[LessEqual[y, 5.5e+99]], $MachinePrecision]], N[((-y) * z), $MachinePrecision], N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;y \leq -3.4 \cdot 10^{+95} \lor \neg \left(y \leq 5.5 \cdot 10^{+99}\right):\\
                            \;\;\;\;\left(-y\right) \cdot z\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\left(1 - t\right) \cdot a\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if y < -3.40000000000000022e95 or 5.5000000000000002e99 < y

                              1. Initial program 91.4%

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

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

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

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

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

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

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

                                  \[\leadsto \left(\mathsf{neg}\left(y\right)\right) \cdot z \]
                                2. lower-neg.f6454.0

                                  \[\leadsto \left(-y\right) \cdot z \]
                              8. Applied rewrites54.0%

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

                              if -3.40000000000000022e95 < y < 5.5000000000000002e99

                              1. Initial program 98.6%

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

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

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

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

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

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

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

                            Alternative 15: 20.3% accurate, 1.9× speedup?

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

                              1. Initial program 98.7%

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

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

                                  \[\leadsto \color{blue}{x} \]

                                if -1.87300000000000014e141 < x < 2.20000000000000007e-154

                                1. Initial program 93.6%

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

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

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

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

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

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

                                  \[\leadsto a \]
                                7. Step-by-step derivation
                                  1. Applied rewrites19.5%

                                    \[\leadsto a \]

                                  if 2.20000000000000007e-154 < x < 1.8999999999999999e93

                                  1. Initial program 96.2%

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

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

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

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

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

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

                                    \[\leadsto z \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites17.9%

                                      \[\leadsto z \]
                                  8. Recombined 3 regimes into one program.
                                  9. Add Preprocessing

                                  Alternative 16: 20.4% accurate, 2.8× speedup?

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

                                    1. Initial program 98.8%

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

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

                                        \[\leadsto \color{blue}{x} \]

                                      if -1.87300000000000014e141 < x < 8.9999999999999997e72

                                      1. Initial program 94.2%

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

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

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

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

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

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

                                        \[\leadsto a \]
                                      7. Step-by-step derivation
                                        1. Applied rewrites16.4%

                                          \[\leadsto a \]
                                      8. Recombined 2 regimes into one program.
                                      9. Add Preprocessing

                                      Alternative 17: 15.0% accurate, 37.0× speedup?

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

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

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

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

                                        Reproduce

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