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

Percentage Accurate: 97.0% → 97.0%
Time: 8.3s
Alternatives: 17
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 17 alternatives:

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

Initial Program: 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.8%

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

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

Alternative 2: 92.5% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \frac{a}{\left(-1 - t\right) + z}\\
t_2 := \left(t - z\right) - -1\\
t_3 := \frac{y - z}{\frac{t\_2}{a}}\\
\mathbf{if}\;t\_3 \leq -2 \cdot 10^{+151}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+70}:\\
\;\;\;\;x - \frac{\left(y - z\right) \cdot a}{t\_2}\\

\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+200}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < -2.00000000000000003e151 or 1.9999999999999999e200 < (/.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. Taylor expanded in x around 0

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

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

      if -2.00000000000000003e151 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < 5.0000000000000002e70

      1. Initial program 96.9%

        \[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-*.f6497.7

          \[\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. metadata-evalN/A

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

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

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

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

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

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

      if 5.0000000000000002e70 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < 1.9999999999999999e200

      1. Initial program 99.8%

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)} \]
      5. Recombined 3 regimes into one program.
      6. Final simplification96.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y - z}{\frac{\left(t - z\right) - -1}{a}} \leq -2 \cdot 10^{+151}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{a}{\left(-1 - t\right) + z}\\ \mathbf{elif}\;\frac{y - z}{\frac{\left(t - z\right) - -1}{a}} \leq 5 \cdot 10^{+70}:\\ \;\;\;\;x - \frac{\left(y - z\right) \cdot a}{\left(t - z\right) - -1}\\ \mathbf{elif}\;\frac{y - z}{\frac{\left(t - z\right) - -1}{a}} \leq 2 \cdot 10^{+200}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{a}{\left(-1 - t\right) + z}\\ \end{array} \]
      7. Add Preprocessing

      Alternative 3: 87.7% accurate, 0.8× speedup?

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

        1. Initial program 96.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. Applied rewrites84.9%

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

          if -5.6999999999999997e-11 < z < 600

          1. Initial program 98.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. Applied rewrites94.8%

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

            if 600 < z < 2.1499999999999999e42

            1. Initial program 100.0%

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

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

                \[\leadsto x - y \cdot \frac{\color{blue}{a}}{1 - z} \]
              3. Step-by-step derivation
                1. Applied rewrites100.0%

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

              Alternative 4: 83.9% accurate, 0.9× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -260:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq 600:\\ \;\;\;\;x - \frac{y}{1 + t} \cdot a\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+140}:\\ \;\;\;\;x - \frac{y}{1 - z} \cdot a\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \end{array} \]
              (FPCore (x y z t a)
               :precision binary64
               (if (<= z -260.0)
                 (- x a)
                 (if (<= z 600.0)
                   (- x (* (/ y (+ 1.0 t)) a))
                   (if (<= z 1.6e+140) (- x (* (/ y (- 1.0 z)) a)) (- x a)))))
              double code(double x, double y, double z, double t, double a) {
              	double tmp;
              	if (z <= -260.0) {
              		tmp = x - a;
              	} else if (z <= 600.0) {
              		tmp = x - ((y / (1.0 + t)) * a);
              	} else if (z <= 1.6e+140) {
              		tmp = x - ((y / (1.0 - z)) * a);
              	} else {
              		tmp = x - 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 <= (-260.0d0)) then
                      tmp = x - a
                  else if (z <= 600.0d0) then
                      tmp = x - ((y / (1.0d0 + t)) * a)
                  else if (z <= 1.6d+140) then
                      tmp = x - ((y / (1.0d0 - z)) * a)
                  else
                      tmp = x - 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 <= -260.0) {
              		tmp = x - a;
              	} else if (z <= 600.0) {
              		tmp = x - ((y / (1.0 + t)) * a);
              	} else if (z <= 1.6e+140) {
              		tmp = x - ((y / (1.0 - z)) * a);
              	} else {
              		tmp = x - a;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a):
              	tmp = 0
              	if z <= -260.0:
              		tmp = x - a
              	elif z <= 600.0:
              		tmp = x - ((y / (1.0 + t)) * a)
              	elif z <= 1.6e+140:
              		tmp = x - ((y / (1.0 - z)) * a)
              	else:
              		tmp = x - a
              	return tmp
              
              function code(x, y, z, t, a)
              	tmp = 0.0
              	if (z <= -260.0)
              		tmp = Float64(x - a);
              	elseif (z <= 600.0)
              		tmp = Float64(x - Float64(Float64(y / Float64(1.0 + t)) * a));
              	elseif (z <= 1.6e+140)
              		tmp = Float64(x - Float64(Float64(y / Float64(1.0 - z)) * a));
              	else
              		tmp = Float64(x - a);
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a)
              	tmp = 0.0;
              	if (z <= -260.0)
              		tmp = x - a;
              	elseif (z <= 600.0)
              		tmp = x - ((y / (1.0 + t)) * a);
              	elseif (z <= 1.6e+140)
              		tmp = x - ((y / (1.0 - z)) * a);
              	else
              		tmp = x - a;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_] := If[LessEqual[z, -260.0], N[(x - a), $MachinePrecision], If[LessEqual[z, 600.0], N[(x - N[(N[(y / N[(1.0 + t), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+140], N[(x - N[(N[(y / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;z \leq -260:\\
              \;\;\;\;x - a\\
              
              \mathbf{elif}\;z \leq 600:\\
              \;\;\;\;x - \frac{y}{1 + t} \cdot a\\
              
              \mathbf{elif}\;z \leq 1.6 \cdot 10^{+140}:\\
              \;\;\;\;x - \frac{y}{1 - z} \cdot a\\
              
              \mathbf{else}:\\
              \;\;\;\;x - a\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if z < -260 or 1.60000000000000005e140 < z

                1. Initial program 97.1%

                  \[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}{a} \]
                4. Step-by-step derivation
                  1. Applied rewrites74.6%

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

                  if -260 < z < 600

                  1. Initial program 98.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. Applied rewrites93.8%

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

                    if 600 < z < 1.60000000000000005e140

                    1. Initial program 95.9%

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

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

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

                        \[\leadsto x - \frac{y}{1 - z} \cdot a \]
                      3. Step-by-step derivation
                        1. Applied rewrites79.9%

                          \[\leadsto x - \frac{y}{1 - z} \cdot a \]
                      4. Recombined 3 regimes into one program.
                      5. Add Preprocessing

                      Alternative 5: 73.7% accurate, 0.9× speedup?

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

                        1. Initial program 96.7%

                          \[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}{a} \]
                        4. Step-by-step derivation
                          1. Applied rewrites73.7%

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

                          if -0.640000000000000013 < z < 3.6000000000000001e-260

                          1. Initial program 99.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. Applied rewrites82.8%

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

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

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

                              if 3.6000000000000001e-260 < z < 1.1599999999999999e56

                              1. Initial program 97.8%

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

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

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

                              Alternative 6: 90.2% accurate, 0.9× speedup?

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

                                1. Initial program 97.5%

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

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

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

                                  if -2.4e6 < y < 4.5000000000000004e-31

                                  1. Initial program 98.3%

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

                                      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)} \]
                                  5. Recombined 2 regimes into one program.
                                  6. Final simplification92.5%

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

                                  Alternative 7: 73.3% accurate, 0.9× speedup?

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

                                    1. Initial program 96.7%

                                      \[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}{a} \]
                                    4. Step-by-step derivation
                                      1. Applied rewrites73.7%

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

                                      if -0.640000000000000013 < z < 3.6000000000000001e-260

                                      1. Initial program 99.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. Applied rewrites82.8%

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

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

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

                                          if 3.6000000000000001e-260 < z < 1.65000000000000001e56

                                          1. Initial program 97.8%

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

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

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

                                              \[\leadsto \mathsf{fma}\left(\frac{y}{t}, -a, x\right) \]
                                            3. Step-by-step derivation
                                              1. Applied rewrites79.3%

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

                                            Alternative 8: 88.8% accurate, 0.9× speedup?

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

                                              1. Initial program 97.8%

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

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

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

                                                  if -1.2e9 < t < 3.8e21

                                                  1. Initial program 97.9%

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

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

                                                    if 3.8e21 < t

                                                    1. Initial program 97.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. Applied rewrites86.3%

                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)} \]
                                                    5. Recombined 3 regimes into one program.
                                                    6. Add Preprocessing

                                                    Alternative 9: 87.4% accurate, 0.9× speedup?

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

                                                      1. Initial program 97.1%

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

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

                                                        if -5.6999999999999997e-11 < z < 640

                                                        1. Initial program 98.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. Applied rewrites94.8%

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

                                                          if 640 < z

                                                          1. Initial program 96.6%

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

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

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

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

                                                            Alternative 10: 78.9% accurate, 1.0× speedup?

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

                                                              1. Initial program 97.6%

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

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

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

                                                                if -1.45e-4 < t < 5.2999999999999997e66

                                                                1. Initial program 98.0%

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

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

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

                                                                    \[\leadsto x - \frac{y}{1 - z} \cdot a \]
                                                                  3. Step-by-step derivation
                                                                    1. Applied rewrites82.5%

                                                                      \[\leadsto x - \frac{y}{1 - z} \cdot a \]
                                                                  4. Recombined 2 regimes into one program.
                                                                  5. Final simplification82.4%

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

                                                                  Alternative 11: 78.6% accurate, 1.0× speedup?

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

                                                                    1. Initial program 97.6%

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

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

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

                                                                      if -1.45e-4 < t < 5.2999999999999997e66

                                                                      1. Initial program 98.0%

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

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

                                                                          \[\leadsto x - y \cdot \frac{\color{blue}{a}}{1 - z} \]
                                                                        3. Step-by-step derivation
                                                                          1. Applied rewrites81.3%

                                                                            \[\leadsto x - y \cdot \frac{\color{blue}{a}}{1 - z} \]
                                                                        4. Recombined 2 regimes into one program.
                                                                        5. Final simplification81.8%

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

                                                                        Alternative 12: 78.8% accurate, 1.0× speedup?

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

                                                                          1. Initial program 97.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. Applied rewrites71.5%

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

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

                                                                              if -1.45e-4 < t < 5.2999999999999997e66

                                                                              1. Initial program 98.0%

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

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

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

                                                                                  \[\leadsto x - \frac{y}{1 - z} \cdot a \]
                                                                                3. Step-by-step derivation
                                                                                  1. Applied rewrites82.5%

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

                                                                                  if 5.2999999999999997e66 < t

                                                                                  1. Initial program 97.2%

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

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

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

                                                                                  Alternative 13: 74.8% accurate, 1.2× speedup?

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

                                                                                    1. Initial program 96.8%

                                                                                      \[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}{a} \]
                                                                                    4. Step-by-step derivation
                                                                                      1. Applied rewrites70.8%

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

                                                                                      if -0.640000000000000013 < z < 1

                                                                                      1. Initial program 98.8%

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

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

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

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

                                                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.64 \lor \neg \left(z \leq 1\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x - \left(y - z\right) \cdot \mathsf{fma}\left(a, z, a\right)\\ \end{array} \]
                                                                                        6. Add Preprocessing

                                                                                        Alternative 14: 74.6% accurate, 1.5× speedup?

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

                                                                                          1. Initial program 96.7%

                                                                                            \[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}{a} \]
                                                                                          4. Step-by-step derivation
                                                                                            1. Applied rewrites70.9%

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

                                                                                            if -4.79999999999999995e27 < z < 1

                                                                                            1. Initial program 98.9%

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

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

                                                                                                \[\leadsto x - \left(y - z\right) \cdot a \]
                                                                                              3. Step-by-step derivation
                                                                                                1. Applied rewrites74.6%

                                                                                                  \[\leadsto x - \left(y - z\right) \cdot a \]
                                                                                              4. Recombined 2 regimes into one program.
                                                                                              5. Final simplification72.8%

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

                                                                                              Alternative 15: 72.7% accurate, 1.7× speedup?

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

                                                                                                1. Initial program 96.7%

                                                                                                  \[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}{a} \]
                                                                                                4. Step-by-step derivation
                                                                                                  1. Applied rewrites73.2%

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

                                                                                                  if -0.640000000000000013 < z < 9.0000000000000006e25

                                                                                                  1. Initial program 98.9%

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

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

                                                                                                      \[\leadsto x - a \cdot \color{blue}{y} \]
                                                                                                    3. Step-by-step derivation
                                                                                                      1. Applied rewrites71.6%

                                                                                                        \[\leadsto x - y \cdot \color{blue}{a} \]
                                                                                                    4. Recombined 2 regimes into one program.
                                                                                                    5. Final simplification72.4%

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

                                                                                                    Alternative 16: 65.5% accurate, 2.2× speedup?

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

                                                                                                      1. Initial program 96.7%

                                                                                                        \[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}{a} \]
                                                                                                      4. Step-by-step derivation
                                                                                                        1. Applied rewrites72.2%

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

                                                                                                        if -2.8000000000000001e-26 < z < 2.1499999999999999e42

                                                                                                        1. Initial program 98.9%

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

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

                                                                                                            \[\leadsto \color{blue}{x} \]
                                                                                                        5. Recombined 2 regimes into one program.
                                                                                                        6. Final simplification65.9%

                                                                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{-26} \lor \neg \left(z \leq 2.15 \cdot 10^{+42}\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
                                                                                                        7. Add Preprocessing

                                                                                                        Alternative 17: 53.3% accurate, 35.0× speedup?

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

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

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

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

                                                                                                          Developer Target 1: 99.7% 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 2025021 
                                                                                                          (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))))