Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3

Percentage Accurate: 97.0% → 97.0%
Time: 8.4s
Alternatives: 15
Speedup: 1.0×

Specification

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

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

real(8) function code(x, y, z, t, a)
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
    code = x - ((y - z) / (((t - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a):
	return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a)
	return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a)))
end
function tmp = code(x, y, z, t, a)
	tmp = x - ((y - z) / (((t - z) + 1.0) / a));
end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\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 15 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: 97.0% accurate, 1.0× speedup?

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

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

real(8) function code(x, y, z, t, a)
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
    code = x - ((y - z) / (((t - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a):
	return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a)
	return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a)))
end
function tmp = code(x, y, z, t, a)
	tmp = x - ((y - z) / (((t - z) + 1.0) / a));
end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 97.0% accurate, 1.0× speedup?

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

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

real(8) function code(x, y, z, t, a)
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
    code = x - ((y - z) / (((t - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a):
	return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a)
	return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a)))
end
function tmp = code(x, y, z, t, a)
	tmp = x - ((y - z) / (((t - z) + 1.0) / a));
end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\end{array}
Derivation
  1. Initial program 97.3%

    \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
  2. Add Preprocessing
  3. Add Preprocessing

Alternative 2: 92.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+63} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+114}\right):\\ \;\;\;\;a \cdot \frac{y - z}{\left(-1 - t\right) + z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{\left(y - z\right) \cdot a}{1 + \left(t - z\right)}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (- y z) (/ (+ (- t z) 1.0) a))))
   (if (or (<= t_1 -2e+63) (not (<= t_1 5e+114)))
     (* a (/ (- y z) (+ (- -1.0 t) z)))
     (- x (/ (* (- y z) a) (+ 1.0 (- t z)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y - z) / (((t - z) + 1.0) / a);
	double tmp;
	if ((t_1 <= -2e+63) || !(t_1 <= 5e+114)) {
		tmp = a * ((y - z) / ((-1.0 - t) + z));
	} else {
		tmp = x - (((y - z) * a) / (1.0 + (t - 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)
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) :: t_1
    real(8) :: tmp
    t_1 = (y - z) / (((t - z) + 1.0d0) / a)
    if ((t_1 <= (-2d+63)) .or. (.not. (t_1 <= 5d+114))) then
        tmp = a * ((y - z) / (((-1.0d0) - t) + z))
    else
        tmp = x - (((y - z) * a) / (1.0d0 + (t - z)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (y - z) / (((t - z) + 1.0) / a);
	double tmp;
	if ((t_1 <= -2e+63) || !(t_1 <= 5e+114)) {
		tmp = a * ((y - z) / ((-1.0 - t) + z));
	} else {
		tmp = x - (((y - z) * a) / (1.0 + (t - z)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y - z) / (((t - z) + 1.0) / a)
	tmp = 0
	if (t_1 <= -2e+63) or not (t_1 <= 5e+114):
		tmp = a * ((y - z) / ((-1.0 - t) + z))
	else:
		tmp = x - (((y - z) * a) / (1.0 + (t - z)))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))
	tmp = 0.0
	if ((t_1 <= -2e+63) || !(t_1 <= 5e+114))
		tmp = Float64(a * Float64(Float64(y - z) / Float64(Float64(-1.0 - t) + z)));
	else
		tmp = Float64(x - Float64(Float64(Float64(y - z) * a) / Float64(1.0 + Float64(t - z))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y - z) / (((t - z) + 1.0) / a);
	tmp = 0.0;
	if ((t_1 <= -2e+63) || ~((t_1 <= 5e+114)))
		tmp = a * ((y - z) / ((-1.0 - t) + z));
	else
		tmp = x - (((y - z) * a) / (1.0 + (t - z)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e+63], N[Not[LessEqual[t$95$1, 5e+114]], $MachinePrecision]], N[(a * N[(N[(y - z), $MachinePrecision] / N[(N[(-1.0 - t), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(N[(y - z), $MachinePrecision] * a), $MachinePrecision] / N[(1.0 + N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+63} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+114}\right):\\
\;\;\;\;a \cdot \frac{y - z}{\left(-1 - t\right) + z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < -2.00000000000000012e63 or 5.0000000000000001e114 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a))

    1. Initial program 99.8%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-/.f64N/A

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{\left(y - z\right) \cdot a}{\left(t - z\right) + 1}} \]
      6. lower-*.f6455.5

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

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

        \[\leadsto x - \frac{\left(y - z\right) \cdot a}{\color{blue}{1 + \left(t - z\right)}} \]
      9. lower-+.f6455.5

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{a \cdot \left(y - z\right)}{\left(1 + t\right) - z}} \]
    6. Step-by-step derivation
      1. associate-/l*N/A

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

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

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

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

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

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

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

        \[\leadsto \left(-a\right) \cdot \frac{y - z}{\color{blue}{\left(1 + t\right) - z}} \]
      9. lower-+.f6488.2

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

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

    if -2.00000000000000012e63 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < 5.0000000000000001e114

    1. Initial program 96.2%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-/.f64N/A

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{\left(y - z\right) \cdot a}{\left(t - z\right) + 1}} \]
      6. lower-*.f6498.3

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

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

        \[\leadsto x - \frac{\left(y - z\right) \cdot a}{\color{blue}{1 + \left(t - z\right)}} \]
      9. lower-+.f6498.3

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

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

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

Alternative 3: 61.6% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \leq 10^{+281}:\\
\;\;\;\;x - a\\

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


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

    1. Initial program 97.2%

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

      \[\leadsto \color{blue}{x - a} \]
    4. Step-by-step derivation
      1. lower--.f6459.8

        \[\leadsto \color{blue}{x - a} \]
    5. Applied rewrites59.8%

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

    if 1e281 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a))

    1. Initial program 100.0%

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

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

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

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

        \[\leadsto \mathsf{neg}\left(\color{blue}{y \cdot \frac{a}{\left(1 + t\right) - z}}\right) \]
      4. distribute-lft-neg-inN/A

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

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

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

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

        \[\leadsto \left(-y\right) \cdot \frac{a}{\color{blue}{\left(1 + t\right) - z}} \]
      9. lower-+.f64100.0

        \[\leadsto \left(-y\right) \cdot \frac{a}{\color{blue}{\left(1 + t\right)} - z} \]
    5. Applied rewrites100.0%

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

      \[\leadsto -1 \cdot \color{blue}{\frac{a \cdot y}{1 + t}} \]
    7. Step-by-step derivation
      1. Applied rewrites76.4%

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

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

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

      Alternative 4: 62.0% accurate, 0.8× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \leq 10^{+281}:\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;\left(-y\right) \cdot a\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (if (<= (/ (- y z) (/ (+ (- t z) 1.0) a)) 1e+281) (- x a) (* (- y) a)))
      double code(double x, double y, double z, double t, double a) {
      	double tmp;
      	if (((y - z) / (((t - z) + 1.0) / a)) <= 1e+281) {
      		tmp = x - a;
      	} else {
      		tmp = -y * 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)
      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) :: tmp
          if (((y - z) / (((t - z) + 1.0d0) / a)) <= 1d+281) then
              tmp = x - a
          else
              tmp = -y * a
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a) {
      	double tmp;
      	if (((y - z) / (((t - z) + 1.0) / a)) <= 1e+281) {
      		tmp = x - a;
      	} else {
      		tmp = -y * a;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a):
      	tmp = 0
      	if ((y - z) / (((t - z) + 1.0) / a)) <= 1e+281:
      		tmp = x - a
      	else:
      		tmp = -y * a
      	return tmp
      
      function code(x, y, z, t, a)
      	tmp = 0.0
      	if (Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a)) <= 1e+281)
      		tmp = Float64(x - a);
      	else
      		tmp = Float64(Float64(-y) * a);
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a)
      	tmp = 0.0;
      	if (((y - z) / (((t - z) + 1.0) / a)) <= 1e+281)
      		tmp = x - a;
      	else
      		tmp = -y * a;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_] := If[LessEqual[N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], 1e+281], N[(x - a), $MachinePrecision], N[((-y) * a), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;\frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \leq 10^{+281}:\\
      \;\;\;\;x - a\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(-y\right) \cdot a\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < 1e281

        1. Initial program 97.2%

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

          \[\leadsto \color{blue}{x - a} \]
        4. Step-by-step derivation
          1. lower--.f6459.8

            \[\leadsto \color{blue}{x - a} \]
        5. Applied rewrites59.8%

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

        if 1e281 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a))

        1. Initial program 100.0%

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

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

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

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

            \[\leadsto \mathsf{neg}\left(\color{blue}{y \cdot \frac{a}{\left(1 + t\right) - z}}\right) \]
          4. distribute-lft-neg-inN/A

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

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

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

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

            \[\leadsto \left(-y\right) \cdot \frac{a}{\color{blue}{\left(1 + t\right) - z}} \]
          9. lower-+.f64100.0

            \[\leadsto \left(-y\right) \cdot \frac{a}{\color{blue}{\left(1 + t\right)} - z} \]
        5. Applied rewrites100.0%

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

          \[\leadsto -1 \cdot \color{blue}{\frac{a \cdot y}{1 + t}} \]
        7. Step-by-step derivation
          1. Applied rewrites76.4%

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

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

              \[\leadsto \left(-y\right) \cdot a \]
          4. Recombined 2 regimes into one program.
          5. Add Preprocessing

          Alternative 5: 69.8% accurate, 0.9× speedup?

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

            1. Initial program 97.9%

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

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

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

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

                \[\leadsto \color{blue}{1} \cdot \frac{a \cdot z}{\left(1 + t\right) - z} + x \]
              4. *-lft-identityN/A

                \[\leadsto \color{blue}{\frac{a \cdot z}{\left(1 + t\right) - z}} + x \]
              5. associate-/l*N/A

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\frac{z}{\color{blue}{\left(1 + t\right) - z}}, a, x\right) \]
              10. lower-+.f6487.6

                \[\leadsto \mathsf{fma}\left(\frac{z}{\color{blue}{\left(1 + t\right)} - z}, a, x\right) \]
            5. Applied rewrites87.6%

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

              \[\leadsto \mathsf{fma}\left(\frac{z}{t}, a, x\right) \]
            7. Step-by-step derivation
              1. Applied rewrites81.8%

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

              if -7.99999999999999998e98 < t < 1.5e-10

              1. Initial program 98.4%

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

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

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

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

                  \[\leadsto \color{blue}{1} \cdot \frac{a \cdot z}{\left(1 + t\right) - z} + x \]
                4. *-lft-identityN/A

                  \[\leadsto \color{blue}{\frac{a \cdot z}{\left(1 + t\right) - z}} + x \]
                5. associate-/l*N/A

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(\frac{z}{\color{blue}{\left(1 + t\right) - z}}, a, x\right) \]
                10. lower-+.f6473.6

                  \[\leadsto \mathsf{fma}\left(\frac{z}{\color{blue}{\left(1 + t\right)} - z}, a, x\right) \]
              5. Applied rewrites73.6%

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

                \[\leadsto \mathsf{fma}\left(\frac{z}{1 - z}, a, x\right) \]
              7. Step-by-step derivation
                1. Applied rewrites73.6%

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

                if 1.5e-10 < t < 3.5999999999999999e168

                1. Initial program 93.0%

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

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

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

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

                    \[\leadsto x - \frac{\color{blue}{\left(y - z\right) \cdot a}}{t} \]
                  4. lower--.f6480.8

                    \[\leadsto x - \frac{\color{blue}{\left(y - z\right)} \cdot a}{t} \]
                5. Applied rewrites80.8%

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

                  \[\leadsto x - \frac{a \cdot y}{t} \]
                7. Step-by-step derivation
                  1. Applied rewrites76.3%

                    \[\leadsto x - \frac{a \cdot y}{t} \]

                  if 3.5999999999999999e168 < t

                  1. Initial program 97.3%

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

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

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

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

                      \[\leadsto x - \frac{\color{blue}{\left(y - z\right) \cdot a}}{t} \]
                    4. lower--.f6476.8

                      \[\leadsto x - \frac{\color{blue}{\left(y - z\right)} \cdot a}{t} \]
                  5. Applied rewrites76.8%

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

                    \[\leadsto x - -1 \cdot \color{blue}{\frac{a \cdot z}{t}} \]
                  7. Step-by-step derivation
                    1. Applied rewrites84.8%

                      \[\leadsto x - \frac{-a}{t} \cdot \color{blue}{z} \]
                  8. Recombined 4 regimes into one program.
                  9. Add Preprocessing

                  Alternative 6: 89.7% accurate, 0.9× speedup?

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

                    1. Initial program 95.9%

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

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

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

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

                        \[\leadsto x - \frac{\color{blue}{\left(y - z\right) \cdot a}}{t} \]
                      4. lower--.f6483.8

                        \[\leadsto x - \frac{\color{blue}{\left(y - z\right)} \cdot a}{t} \]
                    5. Applied rewrites83.8%

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

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

                      if -1.50000000000000003e88 < t < 3.15e16

                      1. Initial program 98.4%

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

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

                          \[\leadsto x - \frac{\color{blue}{\left(y - z\right) \cdot a}}{1 - z} \]
                        2. associate-/l*N/A

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

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

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

                          \[\leadsto x - \left(y - z\right) \cdot \color{blue}{\frac{a}{1 - z}} \]
                        6. lower--.f6493.4

                          \[\leadsto x - \left(y - z\right) \cdot \frac{a}{\color{blue}{1 - z}} \]
                      5. Applied rewrites93.4%

                        \[\leadsto x - \color{blue}{\left(y - z\right) \cdot \frac{a}{1 - z}} \]
                    7. Recombined 2 regimes into one program.
                    8. Final simplification93.5%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.5 \cdot 10^{+88} \lor \neg \left(t \leq 3.15 \cdot 10^{+16}\right):\\ \;\;\;\;x - \frac{a}{t} \cdot \left(y - z\right)\\ \mathbf{else}:\\ \;\;\;\;x - \left(y - z\right) \cdot \frac{a}{1 - z}\\ \end{array} \]
                    9. Add Preprocessing

                    Alternative 7: 69.9% accurate, 0.9× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{z}{t}, a, x\right)\\ \mathbf{if}\;t \leq -8 \cdot 10^{+98}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-10}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{1 - z}, a, x\right)\\ \mathbf{elif}\;t \leq 8.6 \cdot 10^{+189}:\\ \;\;\;\;x - \frac{a \cdot y}{t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                    (FPCore (x y z t a)
                     :precision binary64
                     (let* ((t_1 (fma (/ z t) a x)))
                       (if (<= t -8e+98)
                         t_1
                         (if (<= t 1.5e-10)
                           (fma (/ z (- 1.0 z)) a x)
                           (if (<= t 8.6e+189) (- x (/ (* a y) t)) t_1)))))
                    double code(double x, double y, double z, double t, double a) {
                    	double t_1 = fma((z / t), a, x);
                    	double tmp;
                    	if (t <= -8e+98) {
                    		tmp = t_1;
                    	} else if (t <= 1.5e-10) {
                    		tmp = fma((z / (1.0 - z)), a, x);
                    	} else if (t <= 8.6e+189) {
                    		tmp = x - ((a * y) / t);
                    	} else {
                    		tmp = t_1;
                    	}
                    	return tmp;
                    }
                    
                    function code(x, y, z, t, a)
                    	t_1 = fma(Float64(z / t), a, x)
                    	tmp = 0.0
                    	if (t <= -8e+98)
                    		tmp = t_1;
                    	elseif (t <= 1.5e-10)
                    		tmp = fma(Float64(z / Float64(1.0 - z)), a, x);
                    	elseif (t <= 8.6e+189)
                    		tmp = Float64(x - Float64(Float64(a * y) / t));
                    	else
                    		tmp = t_1;
                    	end
                    	return tmp
                    end
                    
                    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z / t), $MachinePrecision] * a + x), $MachinePrecision]}, If[LessEqual[t, -8e+98], t$95$1, If[LessEqual[t, 1.5e-10], N[(N[(z / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision], If[LessEqual[t, 8.6e+189], N[(x - N[(N[(a * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := \mathsf{fma}\left(\frac{z}{t}, a, x\right)\\
                    \mathbf{if}\;t \leq -8 \cdot 10^{+98}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;t \leq 1.5 \cdot 10^{-10}:\\
                    \;\;\;\;\mathsf{fma}\left(\frac{z}{1 - z}, a, x\right)\\
                    
                    \mathbf{elif}\;t \leq 8.6 \cdot 10^{+189}:\\
                    \;\;\;\;x - \frac{a \cdot y}{t}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_1\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if t < -7.99999999999999998e98 or 8.59999999999999995e189 < t

                      1. Initial program 98.7%

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

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

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

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

                          \[\leadsto \color{blue}{1} \cdot \frac{a \cdot z}{\left(1 + t\right) - z} + x \]
                        4. *-lft-identityN/A

                          \[\leadsto \color{blue}{\frac{a \cdot z}{\left(1 + t\right) - z}} + x \]
                        5. associate-/l*N/A

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(\frac{z}{\color{blue}{\left(1 + t\right) - z}}, a, x\right) \]
                        10. lower-+.f6489.6

                          \[\leadsto \mathsf{fma}\left(\frac{z}{\color{blue}{\left(1 + t\right)} - z}, a, x\right) \]
                      5. Applied rewrites89.6%

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

                        \[\leadsto \mathsf{fma}\left(\frac{z}{t}, a, x\right) \]
                      7. Step-by-step derivation
                        1. Applied rewrites86.0%

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

                        if -7.99999999999999998e98 < t < 1.5e-10

                        1. Initial program 98.4%

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

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

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

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

                            \[\leadsto \color{blue}{1} \cdot \frac{a \cdot z}{\left(1 + t\right) - z} + x \]
                          4. *-lft-identityN/A

                            \[\leadsto \color{blue}{\frac{a \cdot z}{\left(1 + t\right) - z}} + x \]
                          5. associate-/l*N/A

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(\frac{z}{\color{blue}{\left(1 + t\right) - z}}, a, x\right) \]
                          10. lower-+.f6473.6

                            \[\leadsto \mathsf{fma}\left(\frac{z}{\color{blue}{\left(1 + t\right)} - z}, a, x\right) \]
                        5. Applied rewrites73.6%

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

                          \[\leadsto \mathsf{fma}\left(\frac{z}{1 - z}, a, x\right) \]
                        7. Step-by-step derivation
                          1. Applied rewrites73.6%

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

                          if 1.5e-10 < t < 8.59999999999999995e189

                          1. Initial program 92.3%

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

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

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

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

                              \[\leadsto x - \frac{\color{blue}{\left(y - z\right) \cdot a}}{t} \]
                            4. lower--.f6478.7

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

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

                            \[\leadsto x - \frac{a \cdot y}{t} \]
                          7. Step-by-step derivation
                            1. Applied rewrites72.8%

                              \[\leadsto x - \frac{a \cdot y}{t} \]
                          8. Recombined 3 regimes into one program.
                          9. Add Preprocessing

                          Alternative 8: 88.3% accurate, 1.0× speedup?

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

                            1. Initial program 96.2%

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

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

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

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

                                \[\leadsto \color{blue}{1} \cdot \frac{a \cdot z}{\left(1 + t\right) - z} + x \]
                              4. *-lft-identityN/A

                                \[\leadsto \color{blue}{\frac{a \cdot z}{\left(1 + t\right) - z}} + x \]
                              5. associate-/l*N/A

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(\frac{z}{\color{blue}{\left(1 + t\right) - z}}, a, x\right) \]
                              10. lower-+.f6487.5

                                \[\leadsto \mathsf{fma}\left(\frac{z}{\color{blue}{\left(1 + t\right)} - z}, a, x\right) \]
                            5. Applied rewrites87.5%

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

                            if -1.85e35 < z < 1.8499999999999999e-17

                            1. Initial program 98.3%

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

                              \[\leadsto x - \color{blue}{\frac{a \cdot y}{1 + t}} \]
                            4. Step-by-step derivation
                              1. associate-/l*N/A

                                \[\leadsto x - \color{blue}{a \cdot \frac{y}{1 + t}} \]
                              2. *-commutativeN/A

                                \[\leadsto x - \color{blue}{\frac{y}{1 + t} \cdot a} \]
                              3. lower-*.f64N/A

                                \[\leadsto x - \color{blue}{\frac{y}{1 + t} \cdot a} \]
                              4. lower-/.f64N/A

                                \[\leadsto x - \color{blue}{\frac{y}{1 + t}} \cdot a \]
                              5. lower-+.f6490.5

                                \[\leadsto x - \frac{y}{\color{blue}{1 + t}} \cdot a \]
                            5. Applied rewrites90.5%

                              \[\leadsto x - \color{blue}{\frac{y}{1 + t} \cdot a} \]
                          3. Recombined 2 regimes into one program.
                          4. Final simplification89.0%

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

                          Alternative 9: 88.3% accurate, 1.0× speedup?

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

                            1. Initial program 96.6%

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

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

                                \[\leadsto x - \color{blue}{\left(a + \left(-1 \cdot \frac{a \cdot y}{z} - -1 \cdot \frac{a \cdot \left(1 + t\right)}{z}\right)\right)} \]
                              2. distribute-lft-out--N/A

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

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

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

                                \[\leadsto x - \left(\color{blue}{\frac{-1 \cdot \left(a \cdot y - a \cdot \left(1 + t\right)\right)}{z}} + a\right) \]
                              6. distribute-lft-out--N/A

                                \[\leadsto x - \left(\frac{\color{blue}{-1 \cdot \left(a \cdot y\right) - -1 \cdot \left(a \cdot \left(1 + t\right)\right)}}{z} + a\right) \]
                              7. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

                              \[\leadsto x - \mathsf{fma}\left(a, -1 \cdot \color{blue}{\frac{y}{z}}, a\right) \]
                            7. Step-by-step derivation
                              1. Applied rewrites84.2%

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

                              if -2.3e31 < z < 7.09999999999999992e50

                              1. Initial program 97.8%

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

                                \[\leadsto x - \color{blue}{\frac{a \cdot y}{1 + t}} \]
                              4. Step-by-step derivation
                                1. associate-/l*N/A

                                  \[\leadsto x - \color{blue}{a \cdot \frac{y}{1 + t}} \]
                                2. *-commutativeN/A

                                  \[\leadsto x - \color{blue}{\frac{y}{1 + t} \cdot a} \]
                                3. lower-*.f64N/A

                                  \[\leadsto x - \color{blue}{\frac{y}{1 + t} \cdot a} \]
                                4. lower-/.f64N/A

                                  \[\leadsto x - \color{blue}{\frac{y}{1 + t}} \cdot a \]
                                5. lower-+.f6488.1

                                  \[\leadsto x - \frac{y}{\color{blue}{1 + t}} \cdot a \]
                              5. Applied rewrites88.1%

                                \[\leadsto x - \color{blue}{\frac{y}{1 + t} \cdot a} \]
                            8. Recombined 2 regimes into one program.
                            9. Final simplification86.3%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+31} \lor \neg \left(z \leq 7.1 \cdot 10^{+50}\right):\\ \;\;\;\;x - \mathsf{fma}\left(a, \frac{-y}{z}, a\right)\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{1 + t} \cdot a\\ \end{array} \]
                            10. Add Preprocessing

                            Alternative 10: 83.6% accurate, 1.0× speedup?

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

                              1. Initial program 95.8%

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

                                \[\leadsto \color{blue}{x - a} \]
                              4. Step-by-step derivation
                                1. lower--.f6483.4

                                  \[\leadsto \color{blue}{x - a} \]
                              5. Applied rewrites83.4%

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

                              if -2.25e139 < z < 3.0999999999999999e58

                              1. Initial program 98.1%

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

                                \[\leadsto x - \color{blue}{\frac{a \cdot y}{1 + t}} \]
                              4. Step-by-step derivation
                                1. associate-/l*N/A

                                  \[\leadsto x - \color{blue}{a \cdot \frac{y}{1 + t}} \]
                                2. *-commutativeN/A

                                  \[\leadsto x - \color{blue}{\frac{y}{1 + t} \cdot a} \]
                                3. lower-*.f64N/A

                                  \[\leadsto x - \color{blue}{\frac{y}{1 + t} \cdot a} \]
                                4. lower-/.f64N/A

                                  \[\leadsto x - \color{blue}{\frac{y}{1 + t}} \cdot a \]
                                5. lower-+.f6482.7

                                  \[\leadsto x - \frac{y}{\color{blue}{1 + t}} \cdot a \]
                              5. Applied rewrites82.7%

                                \[\leadsto x - \color{blue}{\frac{y}{1 + t} \cdot a} \]
                            3. Recombined 2 regimes into one program.
                            4. Final simplification82.9%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.25 \cdot 10^{+139} \lor \neg \left(z \leq 3.1 \cdot 10^{+58}\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{1 + t} \cdot a\\ \end{array} \]
                            5. Add Preprocessing

                            Alternative 11: 74.9% accurate, 1.0× speedup?

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

                              1. Initial program 96.1%

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

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

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

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

                                  \[\leadsto x - \frac{\color{blue}{\left(y - z\right) \cdot a}}{t} \]
                                4. lower--.f6481.5

                                  \[\leadsto x - \frac{\color{blue}{\left(y - z\right)} \cdot a}{t} \]
                              5. Applied rewrites81.5%

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

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

                                if -1.52000000000000004e88 < t < 1.5999999999999999e-10

                                1. Initial program 98.4%

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

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

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

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

                                    \[\leadsto \color{blue}{1} \cdot \frac{a \cdot z}{\left(1 + t\right) - z} + x \]
                                  4. *-lft-identityN/A

                                    \[\leadsto \color{blue}{\frac{a \cdot z}{\left(1 + t\right) - z}} + x \]
                                  5. associate-/l*N/A

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

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

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

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

                                    \[\leadsto \mathsf{fma}\left(\frac{z}{\color{blue}{\left(1 + t\right) - z}}, a, x\right) \]
                                  10. lower-+.f6473.6

                                    \[\leadsto \mathsf{fma}\left(\frac{z}{\color{blue}{\left(1 + t\right)} - z}, a, x\right) \]
                                5. Applied rewrites73.6%

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

                                  \[\leadsto \mathsf{fma}\left(\frac{z}{1 - z}, a, x\right) \]
                                7. Step-by-step derivation
                                  1. Applied rewrites73.6%

                                    \[\leadsto \mathsf{fma}\left(\frac{z}{1 - z}, a, x\right) \]
                                8. Recombined 2 regimes into one program.
                                9. Final simplification81.9%

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

                                Alternative 12: 68.7% accurate, 1.1× speedup?

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

                                  1. Initial program 96.3%

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

                                    \[\leadsto \color{blue}{x - a} \]
                                  4. Step-by-step derivation
                                    1. lower--.f6471.7

                                      \[\leadsto \color{blue}{x - a} \]
                                  5. Applied rewrites71.7%

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

                                  if -1.10000000000000002e-56 < z < 6.00000000000000043e37

                                  1. Initial program 98.3%

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

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

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

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

                                      \[\leadsto x - \frac{\color{blue}{\left(y - z\right) \cdot a}}{t} \]
                                    4. lower--.f6469.4

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

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

                                    \[\leadsto x - \frac{a \cdot y}{t} \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites68.6%

                                      \[\leadsto x - \frac{a \cdot y}{t} \]
                                  8. Recombined 2 regimes into one program.
                                  9. Final simplification70.2%

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.1 \cdot 10^{-56} \lor \neg \left(z \leq 6 \cdot 10^{+37}\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x - \frac{a \cdot y}{t}\\ \end{array} \]
                                  10. Add Preprocessing

                                  Alternative 13: 62.9% accurate, 1.2× speedup?

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

                                    1. Initial program 96.2%

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

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

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

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

                                        \[\leadsto \color{blue}{1} \cdot \frac{a \cdot z}{\left(1 + t\right) - z} + x \]
                                      4. *-lft-identityN/A

                                        \[\leadsto \color{blue}{\frac{a \cdot z}{\left(1 + t\right) - z}} + x \]
                                      5. associate-/l*N/A

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

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

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

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

                                        \[\leadsto \mathsf{fma}\left(\frac{z}{\color{blue}{\left(1 + t\right) - z}}, a, x\right) \]
                                      10. lower-+.f6477.6

                                        \[\leadsto \mathsf{fma}\left(\frac{z}{\color{blue}{\left(1 + t\right)} - z}, a, x\right) \]
                                    5. Applied rewrites77.6%

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

                                      \[\leadsto \mathsf{fma}\left(\frac{z}{t}, a, x\right) \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites72.4%

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

                                      if -2.6e91 < t < 9.5000000000000006e-40

                                      1. Initial program 98.3%

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

                                        \[\leadsto \color{blue}{x - a} \]
                                      4. Step-by-step derivation
                                        1. lower--.f6463.7

                                          \[\leadsto \color{blue}{x - a} \]
                                      5. Applied rewrites63.7%

                                        \[\leadsto \color{blue}{x - a} \]
                                    8. Recombined 2 regimes into one program.
                                    9. Final simplification68.1%

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.6 \cdot 10^{+91} \lor \neg \left(t \leq 9.5 \cdot 10^{-40}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{t}, a, x\right)\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]
                                    10. Add Preprocessing

                                    Alternative 14: 60.2% accurate, 8.8× speedup?

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

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

                                      \[\leadsto \color{blue}{x - a} \]
                                    4. Step-by-step derivation
                                      1. lower--.f6458.1

                                        \[\leadsto \color{blue}{x - a} \]
                                    5. Applied rewrites58.1%

                                      \[\leadsto \color{blue}{x - a} \]
                                    6. Add Preprocessing

                                    Alternative 15: 17.4% accurate, 11.7× speedup?

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

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

                                      \[\leadsto \color{blue}{x - a} \]
                                    4. Step-by-step derivation
                                      1. lower--.f6458.1

                                        \[\leadsto \color{blue}{x - a} \]
                                    5. Applied rewrites58.1%

                                      \[\leadsto \color{blue}{x - a} \]
                                    6. Taylor expanded in x around 0

                                      \[\leadsto -1 \cdot \color{blue}{a} \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites16.2%

                                        \[\leadsto -a \]
                                      2. Add Preprocessing

                                      Developer Target 1: 99.6% accurate, 1.2× speedup?

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

                                      Reproduce

                                      ?
                                      herbie shell --seed 2024353 
                                      (FPCore (x y z t a)
                                        :name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
                                        :precision binary64
                                      
                                        :alt
                                        (! :herbie-platform default (- x (* (/ (- y z) (+ (- t z) 1)) a)))
                                      
                                        (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))